Linux – Create a remote copy of linux server filesystem

backuplinux

I have a decommissioned server (VPS server with a hosting company) that I need to backup before we close our account. I don't need to run the server anywhere else, I just need a browse-able copy of all the files. What's the best way to get a copy of the server's filesystem based off ssh access?

VPS is a Debian distro.

Best Answer

Your options are endless! The big three:

  • rsync the system to a remote storage location
    (man rsync -- Too many sub-options to list, but rsync -azH is probably a good start)

  • tar everything up and shove it over SSH
    tar cf - | ssh some-other-location tar xf - -- Obviously you don't have to extract to the other location, you can keep it in a tarball, compress it before it goes over the network, etc.

  • Use your backup software to cut a "final archive"
    You do have backup software, right? So you can just cut a full backup and archive it.
    (If you don't have backup software, GET SOME.)