Download a Local Copy of your Linode Backup
Traducciones al EspañolEstamos traduciendo nuestros guías y tutoriales al Español. Es posible que usted esté viendo una traducción generada automáticamente. Estamos trabajando con traductores profesionales para verificar las traducciones de nuestro sitio web. Este proyecto es un trabajo en curso.
The Linode Backups service can create automatic and manual snapshots of your Linode. A completed backup can be directly restored to the origin Linode or to a new Linode in the same data center. These workflows make it easy to revert to a working configuration if you run into any unexpected issues with your software.
Linode’s backups are stored in a way that is only directly readable by the Linode Backups service. A common question for the service is how you can download the content from your Linode Backups to another storage location, like your home computer. This can be accomplished in two phases:
- Restore a backup to a new or existing Linode.
- Download either specific files or the entire disk image from that Linode, as needed.
Before You Begin
Account Permissions and Billing
Several of the steps in this guide involve adding services to or removing services from a Linode account. Visit our guide on Users and Permissions for more information about restricted Linode users.
Note that the cost of adding Backups service and adding a Linode to your account is billed, prorated per hour. If the backups service is only enabled for a few hours, you will only be charged for a few hours of the service. See the Backups pricing details for more information. Likewise, when you create a Linode, you will be billed per hour that the Linode exists, whether it is powered on or not.
The steps in this guide have been designed to minimize the potential costs associated with this process. Additionally, keep the following in mind:
- Removing a Linode from your account also cancels the associated Backup service for that Linode.
- A Linode’s backups are deleted when a Linode is deleted.
- If you choose to leave the Backups service enabled, or if you do not remove the additional Linode from your account, you will be automatically billed. If you only power the Linode off, you will still be billed for it.
Enable Backups and Take a Snapshot
These steps are the minimum required for the scope of this guide. Visit our Backups guide for information about how to implement regular backups of your Linode.
Go to your Linode’s dashboard, click Backups, click Enable backups for this Linode » and confirm the additional cost per month.
This guide focuses on saving a snapshot or specific backup. Click Take a New Snapshot Now.
- The snapshot appears in the Backup History at the bottom of the page.
Download Specific Files or Directories over SSH
If you just need specific files from your Linode, you can download those over SSH. Downloading files over SSH can be done at a command-line interface, or with a graphical SFTP file browser.
Secure Copy Protocol (SCP)
You can use SCP to retrieve a specific directory or file via the command-line. SCP is installed by default on most macOS and Linux systems, and is available with Cygwin or PuTTY for Windows.
The syntax for using SCP to copy a file from your Linode into a directory on another computer is:
scp your_linode_username@your_linode_ip:/path/to/your/file.txt /path/to/your/local/directory/
The file will be saved inside
To copy a file from your Linode to another computer and give it a specific name (in this case,
scp your_linode_username@your_linode_ip:/path/to/your/file.txt /path/to/your/local/directory/file.txt.backup
To copy an entire directory:
scp -r your_linode_username@your_linode_ip:/path/to/your/directory /path/to/your/local/directory
/path/to/your/local/directoryalready exists on your computer, then the copied directory will be placed inside
/path/to/your/local/directorydoes not already exist, then the copied directory will be created with that name.
Download an NGINX configuration file to your user’s
scp your_linode_username@your_linode_ip:/etc/nginx/conf.d/example.com.conf ~/example.com.conf.backup
Download an Apache configuration file to your
scp your_linode_username@your_linode_ip:/etc/apache2/sites-available/example.com.conf ~/example.com.conf.backup
Copy the entire document root from a web server:
scp -r your_linode_username@your_linode_ip:/var/www/html/ ~/html_backup
If you intend to repeat this process regularly, consider using rsync to create additional local copies of your data. rsync is capable of performing incremental file copies, which means you do not have to fully transfer each file every time you download your data.
FileZilla is a popular free and open source FTP, FTPS, and SFTP client which has a GUI but can also take CLI arguments. In contrast to SCP, SFTP can list directory contents, create or delete files, and resume interrupted file transfers.
See our FileZilla guide for more information.
Downloading Data from a Database
Special care is needed when downloading data from a database. Before it can be downloaded, the data in a database needs to first be dumped to a file. This database dump file can then be transferred just as any other normal file type.
To create a dump of a MySQL (or MariaDB) database, use the
mysqldumpcommand. You can only use this tool if your database process is accessible and running.
If your MySQL database won’t run for some reason, follow the instructions for creating physical backups.
If you use PostgreSQL, follow the How to Back Up Your PostgreSQL Database guide.
Download a Disk over SSH
Downloading your disk will copy a
.img file to your computer that encapsulates all of the data that is on your Linode’s disk. This disk image can later be re-uploaded to the Linode service at a later date, which can be useful if you’d like to temporarily remove your Linode and stop service. Follow our
Copy a Disk over SSH guide for further instructions.
Clean Up after Your Download
After you’ve finished downloading your files or disks, you can optionally delete the restored disks. If you created a new Linode to perform the restore, consider deleting the Linode. As a reminder, billing for that Linode will continue automatically if you do not remove it. If you only power the Linode off, you will still be billed for it.
This page was originally published on