Download Files from Your Linode
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.
There are a number of open source tools you can use to download files from your Linode. You have the option to either download specific files and directories or copy complete images of your Linodes’ disks.
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 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
mysqldump
command. 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.
Download Data from a Block Storage Volume
Attach and mount the block storage volume.
Download files from it by following the same instructions in the Download Specific Files or Directories over SSH section of this guide.
This page was originally published on