[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: An experiment in backup



On Thu, Jan 15, 2015 at 08:47:01PM -0800, Kevin O'Gorman wrote:
> On Thu, Jan 15, 2015 at 8:41 PM, David Christensen <
> > There are two basic kinds of "backups":
> >
> > 1.  File system -- e.g. a copy of the files and directories on an mounted
> > and operating drive.
> >
> > 2.  Raw binary image -- e.g. a copy of the bytes on a drive taken when the
> > drive is powered, but the partitions, volumes, file systems, etc., are not
> > mounted.
> >
> >
> > For system drives, the former won't work; you need the later.  I connect a
> > large hard drive (to hold the images), boot Debian installation media into
> > rescue mode, and use 'dd' to backup/ restore system drive raw binary images.
> >
> > I was hoping for some details on why this won't work on system drives, or
> conditions under which it just might.  Another user has suggested I read
> https://help.ubuntu.com/community/BackupYourSystem/TAR which suggests that
> it actually should work.

Image backups are definitely easier for doing disaster recovery of an
entire machine.  And when you have that kind of problem, you may really
appreciate having to do less work / make fewer decisions.

But filesystems backups can be used for disaster recovery.  I've done
it.  One potential problem is that on a running system, things change.
So at the start of your backup, you backup file A.  At the end of the
backup, you backup file Z.  But in the middle of the backup, both file A
and file Z have changed.  And some software requires that file A and
file Z be in sync.  When you restore, those files are not in sync and
you could have a problem.

In practice, I haven't seen this be a problem much on home desktop
machines.  But that's not to say it couldn't be a problem.

Another thing to consider is hardware changes.  This can make certain
devices be named differently when you restore.  eth0 becomes eth1, and
/etc/network/interfaces doesn't have a stanza for eth1.  /dev/dvd
becomes /dev/dvd1, and your cd burner was set to look for /dev/dvd which
no longer exists.  These things can be fixed in the /etc/udev/rules.d
directory.

UIDs of disk partitions will change.  If /etc/fstab references UIDs, you
need to update it.  Same for /boot/grub/grub.cfg, although for that you
run update-grub2 from the restored system (you'll need to boot with a
live cd and chroot, or you'll need to boot with Super Grub Disk or
similar).  You will also need to install the bootloader on the new hard
disk.  'grub-install /dev/sda' 

The UUID and Grub issues don't show up when restoring from an image
backup, but the network card and cd burner issues can.

There are a lot of free software backup solutions available.  I would
recommend using one of those, unless this endevour is more for learning
experience than anything else.

Backuppc may be overkill for your case, but it's pretty good.  It will
do file pooling and compression, so keeping multiple backups of one or
more machines doesn't take up much disk space.

-Rob

Attachment: signature.asc
Description: Digital signature


Reply to: