Download a Local Copy of your Linode Backup

Traducciones al Español
Estamos 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.
Create a Linode account to try this guide with a $100 credit.
This credit will be applied to any valid services used during your first 60 days.

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:

  1. Restore a backup to a new or existing Linode.
  2. 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.

  1. Go to your Linode’s dashboard, click Backups, click Enable backups for this Linode » and confirm the additional cost per month.

  2. 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 /path/to/your/local/directory/.

  • To copy a file from your Linode to another computer and give it a specific name (in this case, file.txt.backup):

    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
    

    If /path/to/your/local/directory already exists on your computer, then the copied directory will be placed inside /path/to/your/local/directory (i.e. /path/to/your/local/directory/directory).

    If /path/to/your/local/directory does not already exist, then the copied directory will be created with that name.

For example:

  • Download an NGINX configuration file to your user’s /home folder:

      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 /home folder:

      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

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 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.

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


Your Feedback Is Important

Let us know if this guide made it easy to get the answer you needed.


Join the conversation.
Read other comments or post your own below. Comments must be respectful, constructive, and relevant to the topic of the guide. Do not post external links or advertisements. Before posting, consider if your comment would be better addressed by contacting our Support team or asking on our Community Site.