TAR a system over SSH

Here is a sample command. You may need sudo/access to files/etc. I assume you can sort that out.

ssh user@host sudo tar -cvpf - --one-file-system / > backup-(date +%Y-%m-%d--%H-%M).tar

This will print the file list to you over stdout, and create a tar file piped to your local system with the root filesystem. Simple and effective to back up a VPS. SSH is encrypted, so this should be fine from that regard.

No this is probably not a good idea. Yes it works.

  • scripts/backups/tar_over_ssh.txt
  • Last modified: 2023-01-15 23:13
  • by Tony