[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[rdiff-backup-users] Magic increments via LVM snapshots idea
From: |
Steven Willoughby |
Subject: |
[rdiff-backup-users] Magic increments via LVM snapshots idea |
Date: |
Mon, 23 Apr 2007 17:19:32 -0600 |
User-agent: |
Thunderbird 1.5.0.10 (X11/20070403) |
Hello everyone,
I think it is possible to combine rdiff-backup and LVM snapshots to
have incremental backups on the same machine without having two full
copies of the data set. What follows are some instructions on how I
think this would be done:
First, set up LVM such that you have one large partition for your
data, one small partition for your incremental backups, and enough free
space to make snapshots. For sake of simplicity, pretend you mount them
as follows:
/data
/increments
/snapshots/xx
1. Create a symlink for rdiff-backup-data (ln -s /increments
/rdiff-backup-data)
2. Create snapshots/1 (a snapshot of /data)
3. Wait a few hours (or day, or whatever) for data to change
4. Create snapshots/2 (another snapshot of /data, now there are two
active snapshots)
5. Run rdiff-backup /snapshots/2 /snapshots/1
6. Destroy snapshots/1
7. Repeat steps 3-6 indefinitely, incrementing the snapshot number each time
I not yet had a chance to try this out on a computer but it seems to
work in my head. I am posting it in the hopes someone might find it useful.
Steven
Note: If you ever accidentally destroy both snapshots then you will lose
history for any file that has changed since the last time rdiff-backup
has run. (This can be checked with --verify.)
Another note: Step 5 will update the oldest snapshot so that it is
identical to the newest. Since the oldest is immediately destroyed
after rdiff-backup runs, this update is not necessary and rdiff-backup
could be patched to skip it and only create increment files.
Yet another note: You will need to pass the -b and --exclude
/snapshots/2/rdiff-backup-data options in step 5.
- [rdiff-backup-users] Magic increments via LVM snapshots idea,
Steven Willoughby <=