SFTP from the macOS Terminal

Back up and restore files from and to your node with the sftp command.

1. Back up files from your node

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

2. Restore files to your node

  1. Open a new Terminal session and use cd to go to the folder that contains the files you want to upload. For example:
    cd ~/documents/node_backup
  2. Open an SFTP connection to your server (replace the username and IP address with your own):
    sftp username@111.111.111.111
  3. Upload a file from your computer to your server. Replace myfile with the file you want to upload and /home/username/path-to-file with the target directory:
    put myfile /home/username/path-to-file
  4. If you don't see any errors, the file is now on your server. You can close the Terminal.
All SFTP guides Using Termius instead