Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
Please tell us what OS type you are running. –  Skaperen Aug 2 '12 at 22:19
6  
rsync of the relevant directories? –  Luca Filipozzi Aug 2 '12 at 22:22
add comment

3 Answers 3

up vote 4 down vote accepted

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

share|improve this answer
    
rsync works nicely thanks –  DaveR9 Aug 2 '12 at 22:55
add comment

Use rsync

rsync -avzH root@remoteserver:/ /local/folder
  • -a archive
  • -v verbose
  • -z compression
  • -H preserve hard links
share|improve this answer
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.