Full system backup to protect the whole OS and virtual servers

4 posts / 0 new
Last post
#1 Mon, 04/08/2013 - 16:36
allardsmol

Full system backup to protect the whole OS and virtual servers

Hi everybody!

I have a few questions concerning a full system backup. I would like to backup my whole (ubuntu 12.04 system including virtual server.

Which are the most important directories which need to be in the backup and which not? I ask this because because some directories are not usefull and/or can cause trouble when making the backup or during restore session.

Is it possible to restore in case of system damage, the whole system including virtual server/ systemfiles and all others?

Thanks in advance!

Tue, 04/09/2013 - 08:10
andreychek

Howdy,

For backups, you'd want to generate a set of Virtualmin backups, using Backup and Restore -> Scheduled Backups.

That will make sure that each domain is backed up, along with all it's settings, files, databases, and the like.

If something happened to your server, you could install an OS on a new server, install Virtualmin, and then import those backups.

If you wanted to backup additional files, there's a variety of ways to do that... one way is to use Webmin -> System -> Filesystem Backup.

There's not really any files/dirs that would make restoring difficult.

-Eric

Tue, 04/09/2013 - 10:19
allardsmol

Hi Eric!

Thanks a lot for your advice.

I found in the meantime the following commands and they make a perfect backup from the disk. By going into the / you take a backup this and all underlaying folders. excluding Proc, lost+found, mnt and sys.

If you want only a backup of a specific folder then simply cd to that folder and start the backup command from there.

Here the commands for a full system backup

sudo su

cd /

tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys /

to untar all files. All files will be overwritten.

tar xvpfz backup.tgz -C /

Last but not least, don't forget to create the folders which where excluded in the original backup.

mkdir proc mkdir lost+found mkdir mnt mkdir sys

After reboot you should have your original situation from before your backup.

This is very simple but very effective. I hope other users can benefit from this.

Allard

Tue, 04/09/2013 - 10:21
allardsmol

the backup command was not printed well so here again but everything should be on ONE line.

tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys /

Topic locked