Download Files from Your Linode
Updated by Linode Written by Linode
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 [email protected]_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 [email protected]_linode_ip:/path/to/your/file.txt /path/to/your/local/directory/file.txt.backup
To copy an entire directory:
scp -r [email protected]_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 [email protected]_linode_ip:/etc/nginx/conf.d/example.com.conf ~/example.com.conf.backup
Download an Apache configuration file to your
scp [email protected]_linode_ip:/etc/apache2/sites-available/example.com.conf ~/example.com.conf.backup
Copy the entire document root from a web server:
scp -r [email protected]_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 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.
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.
Join our Community
This guide is published under a CC BY-ND 4.0 license.