The institution I work for wants me to backup the entire filesystem of a server and store it on another server. Both servers are running the latest release of Ubuntu. I'm having a little bit of trouble trying to figure out not only how to do this, but how to do this remotely, so I'm hoping the brilliant minds here can give me some guidance.

My train of thought for how I should accomplish this goes like this :

First, I need to tar up the entire filesystem of Server 1. I know I'll need to exclude the /proc directory when I do this (and of course I'll need sudo). I'm having a bit of trouble figuring out what the tar command could be used to accomplish this.

After I have an archive of the filesystem I need to send the archive from Server 1 to Server 2. What command would I do this with?

Finally, I'm going to be doing all of this remotely so how do I launch my commands so that they continue running if the connection on my end were to time out? Should I use screen commands? Should I use nohup?

Thanks in advance for your time, I truly appreciate it.


There is a nice page here that should get you started.

Ubuntu Server Guide Backups - Shell Scripts

It includes a script to make the backup. The script backs up the archive to a NFS mounted directory, but you can transfer the archive with ssh (scp) or rsync or just about any network protocol.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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