2

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.

2
  • Please tell us what OS type you are running.
    – Skaperen
    Aug 2, 2012 at 22:19
  • 6
    rsync of the relevant directories? Aug 2, 2012 at 22:22

3 Answers 3

4

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.)

0
4

Use rsync

rsync -avzH root@remoteserver:/ /local/folder
  • -a archive
  • -v verbose
  • -z compression
  • -H preserve hard links
0

Just to throw a block level copy into the ring:

You can use dd and nc to mirror the whole disk if you'd like.

On your receiving server, open up a listening port and redirect the output to a file.

nc -l someportnumber | dd of=/tmp/diskimage

On the VPS, read the disk with dd and redirect the output to your remote server.

dd if=/dev/sda | nc remote.server.hostname someportnumber

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .