1. Back up files from your node
-
Open a new Terminal session and use
cdto go to the folder where you want to store the backup (downloaded files are saved there). For example, to save files in anode_backupfolder in your Documents (make sure the folder exists):cd ~/documents/node_backup -
Open an SFTP connection to your server. It uses the same structure as the
sshcommand; replace the username and IP address with your own:sftp username@111.111.111.111 -
Download a file from your server to your computer. Replace
/home/username/path-to-filewith the full path (including the filename) of the file you want to download:get /home/username/path-to-file - If you don't see any errors, the file is now in the folder on your computer (
node_backupin this example). You can close the Terminal.
2. Restore files to your node
-
Open a new Terminal session and use
cdto go to the folder that contains the files you want to upload. For example:cd ~/documents/node_backup -
Open an SFTP connection to your server (replace the username and IP address with your own):
sftp username@111.111.111.111 -
Upload a file from your computer to your server. Replace
myfilewith the file you want to upload and/home/username/path-to-filewith the target directory:put myfile /home/username/path-to-file - If you don't see any errors, the file is now on your server. You can close the Terminal.