Re: Proper backup and restore -- is there a way?



On Thu, Jan 26, 2012 at 7:39 AM, Marcus Reid <marcus@xxxxxxxxxxxxxx> wrote:
Hi,

I am trying to find out the best way to make backups of an Ubuntu
machine that allows me to restore to bare metal, boot, and go home.
As an example of what I'm looking for, here is how I do it in FreeBSD
and Solaris:

FreeBSD (ufs):

 - Use 'dump' (with -L) to dump consistant snapshots of each filesystem
   (no need to shut down databases to ensure consistency, etc.)

 - When it comes time to restore, boot off of cd/thumbdrive, 'fdisk
   -BI' for the mbr, partition disk and install 2nd stage bootloader
   with 'bsdlabel', 'restore' each partition, and reboot.  Go home
   and go back to sleep.

 - I have not tested any backup/restore of ZFS-based FreeBSD machines.

Solaris (zfs):

 - make a zfs replication stream of snapshots of all partitions in the
   root pool with 'zfs snapshot -r rpool@now', then 'zfs send -R
   rpool@now > backupfile'.  Do the same for other pools, if any, being
   backed up.

 - Netboot the machine to a jumpstart server or boot off of install
   media, and use the procedure documented at:

     http://docs.oracle.com/cd/E19963-01/html/821-1448/ghzvz.html#ghzur

Now, with this Ubuntu box (ext4) I'm seeing a couple of things that I
would like to find solutions for:

 - lack of snapshots prevents dumping of an active filesystem without
   corrupting active databases, etc.

 - how does one go about restoring to bare metal with Ubuntu?  Boot
   off of install media, partition, and lay down dumps?  Are there
   special considerations for the /dev/md0 /boot partition and the
   device mapper partitions?  For example, here is what I've got to
   work with:

       mreid@socit:~$ mount
       /dev/mapper/socit-root on / type ext4 (rw,relatime,errors=remount-ro)
       proc on /proc type proc (rw,noexec,nosuid,nodev)
       none on /sys type sysfs (rw,noexec,nosuid,nodev)
       none on /sys/fs/fuse/connections type fusectl (rw)
       none on /sys/kernel/debug type debugfs (rw)
       none on /sys/kernel/security type securityfs (rw)
       none on /dev type devtmpfs (rw,mode=0755)
       none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
       none on /dev/shm type tmpfs (rw,nosuid,nodev)
       none on /var/run type tmpfs (rw,nosuid,mode=0755)
       none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
       none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
       /dev/md0 on /boot type ext4 (rw)
       /dev/mapper/socit-tmp on /tmp type ext4 (rw,nosuid,nodev,relatime)
       /dev/mapper/socit-home on /home type ext4 (rw,relatime)
       /dev/mapper/socit-var on /var type ext4 (rw)

I have asked around a bit and have not seen much in the way of peoples
actual methods, so I would love to hear what you do when faced with a
dead system that needs to be restored.

I do not know much abojut these stuff, however I have seen that ZFS is
available in Ubuntu, with the zfs-fuse package.

A newer version is available here:

http://zfs-fuse.net

I do not know how ready for prime time it is though.


--
Ioannis Vranos

http://cppsoftware.binhoster.com

--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users