Best Practices - disaster recovery

Please ask questions here if you are not familiar with fsarchiver
Post Reply
Posts: 1
Joined: Mon Jun 25, 2012 6:45 pm

Best Practices - disaster recovery

Post by dbrooke » Mon Jun 25, 2012 7:20 pm

Hello all,

I came to fsarchiver by way of partimage not working for my particular situation. (partimage does *not* support the default fs type (ext4) installed by ubuntu 12.04).

Since FS Archiver works a bit differently than partimage, I wanted to see if anyone could offer a quick "best practices" for disaster recovery.

ie., something like:
1.) Note your partition scheme.
** since FS Archiver does not recreate partitions, I would think an admin would have to note the size of the partition if installing a new drive and recovering from fscarchiver... maybe something like:

Code: Select all

fsarchiver probe simple > /mnt/mybackup/my_partitions.txt
2.) Create your backup.
(is there a way to record your command used??)

Then the best practice to restore after replacing the disk?
1.) Check the my_partitions.txt file and recreate your partitions with sizes, etc..
2.) restore from backup

Of course, the above is incomplete as I am trying to prompt someone who is more knowledgeable than I to help with it's completion. ;-)



Posts: 3
Joined: Mon Oct 22, 2012 6:54 pm

Re: Best Practices - disaster recovery

Post by LHammonds » Mon Oct 22, 2012 7:09 pm

I am in the process of creating a procedure/documentation to backup and restore Ubuntu partitions. It can be found here: Backup Partitions Using LVM Snapshots and FSArchiver

The basic flow for creating an archive goes like this:

Code: Select all

## Create the snapshot volume of the partition to be backed up.
lvcreate --size=5G --snapshot --name="tempsnap" /dev/LVG/root > /dev/null 2>&1

## Create the compressed and encrypted archive of the snapshot.
fsarchiver savefs --compress=7 --jobs=1 --cryptpass="abc123" --label="insert comment here" /bak/root.fsa /dev/LVG/tempsnap > /dev/null 2>&1

## Create an informational text file about the archive.
fsarchiver archinfo --cryptpass="abc123" /bak/root.fsa > /bak/root.txt 2>&1

## Remove the snapshot.
lvremove --force /dev/LVG/tempsnap > /dev/null 2>&1

## Create a checksum file about the archive.
md5sum /bak/root.fsa > /bak/root.md5

## Verify that the checksum file can validate against the archive.
md5sum --check --status /bak/root.md5
My system uses LVM for all partitions except /boot so my backups are be run at any point during the day with no downtime.

My restore process makes use of a SystemRestoreCD to which I boot the system with that CD and restore from the local backups on the /bak partition or mount the remote offsite storage and restore from there (or copy to the local /bak partition to speed things up)

It helps tremendously if you labeled your partitions when you installed your OS. The thread I linked above goes over how I created the partitions earlier when the OS was installed and a little further down, you see the exact restore steps used.


Post Reply