[wplug] Re: more backing up

Vance Kochenderfer vance at happylemur.com
Sat Apr 3 08:53:26 EST 2004


On Fri, 2 Apr 2004, John Harrold <jmh17 at pitt.edu> wrote:

> on the topic of backing up, does anyone know of a method for realtime
> mirroring of filesystems across the network? currently i do backups across
> the network using rsync with some shell scripts called from cron. what i
> would like is when i write the file it writes the file to the local disc
> and simultaneously to the disc across the network. 

You could use fam on the source machine (the one you want to mirror) to
check when files change, then use rsync to push the changes to the
backup machine.  See this article:
<http://www.tldp.org/linuxfocus/English/March2001/article199.shtml>

Note that there are some limitations to this method, but they might
have been fixed by now.

Another method is provided solely for entertainment value.  If (unlike
me) you know what you're doing with NFS and loopback filesystems, you
might even be able to get it to work.

- Copy the entire contents of the source drive to the backup drive as a
   file (e.g., dd if=/dev/hda of=/mnt/other/home/user/somefile).  This
   assumes that the backup drive is larger than the source drive.
- Set up the backup machine as an NFS server so that somefile is shared.
- On the source machine, mount the backup drive via NFS
- On the source machine, mount somefile as a loopback filesystem
- Enable software RAID in the source machine's kernel, with /dev/hda
   and /dev/loop0 in a RAID-1 (mirroring) configuration
- Stand by the power cord and be ready to pull it in case something
   starts to smoke

Vance Kochenderfer        |  "Get me out of these ropes and into a
vance at happylemur.com      |   good belt of Scotch"    -Nick Danger




More information about the wplug mailing list