SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
Snapshot naming...
Author Message
Post Snapshot naming... 
Hi..

I'm attempting to use rsnapshot to create a "mirror w/ snapshots"
on a second disk. I just can't figure out how to accomplish it.
Any suggestions would be appreciated.

Disk 1:
/
/dev
/etc/
/usr
/var
...


Disk 2:

/
/dev
/etc
/usr
/var
...
/.snapshot
hourly.

My hope would be that all of the files on Disk 2 contain the latest snapshot
from disk1 and that the .snapshot's directory would contain older snapshots.
Has anyone been able to accomplish something like this? The end result
would give you a second disk that contained all files/dir located in the
same directory structure when mounted as the first disk along with the
additional .snapshot directory containing older snapshots.


Thanks
Mike




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post Snapshot naming... 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Michael,

I presume you want this so the second disk can double as a standby
drive in case the primary drive fails? That's an interesting idea.

rsnapshot doesn't support this as a feature specifically, but if you
add in a couple of rsync commands, it should be possible.

I would think a good strategy would be as follows.

First, let's set up the basics (I'm assuming stuff here, fill in your
own values as appropriate):

The root of your dedicated backup / snapshot drive will be mounted
under /backup/.
Your snapshot root will be /backup/.snapshots/.

Now, the backup strategy:

Do a big rsync via cron from your root filesystem to /backup/, with
exclude rules for /proc, /tmp, and of course, /backup/ itself. Run
this periodically before your rsnapshot hourly/daily/lowest interval.

After the first big sync, do a cp -al of /backup/* into
/backup/.snapshots/hourly.0/. You could also do an rsync using
link-dest, i.e. rsync / --link-dest /backup/ /backup/.snapshots/. The
important thing here is that you're hard linking the files from
/backup/* into /backup/.snapshots/hourly.0/

Set rsnapshot up to use /backup/.snapshots/ as its snapshot root.
rsnapshot's one backup point (for localhost anyway) would be /backup/.
Run it normally, immediately after the rsync cron job above which
syncs the root filesystem into /backup/.

If you plan on ever booting from the backup drive, don't forget to run
LILO or grub (or whatever) on the snapshot drive and test to make sure
it works.

You should now (in theory) have a bootable, dedicated backup drive,
with the unique property of having the "main" filesystem hard linked
directly into the snapshots. If you ever boot off this drive and use
it as your primary, any files you change without older versions will
lose their history, but it is an interesting dual use.

If you do any of this, make sure and post here and let us know how it
goes. This is all theory, but I see no reason why it wouldn't work
very well.

If there is enough interest, I might be able to work something like
this into rsnapshot proper, though I'm not sure what exactly without
giving it some more thought. If anyone has any clear ideas about how
this could be done, I'd be interested to hear them.

Thanks,
- -Nathan

My hope would be that all of the files on Disk 2 contain the latest
snapshot from disk1 and that the .snapshot's directory would
contain older snapshots. Has anyone been able to accomplish
something like this? The end result would give you a second disk
that contained all files/dir located in the same directory
structure when mounted as the first disk along with the additional
.snapshot directory containing older snapshots.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFC3zsSgBvN4A95aoYRAhyrAJsGfJ14KbIlVit4ejKxUEzLjLQlfgCgwqk0
IyNAzcaVJ+JTiV8/yyow/A8=
=AHwJ
-----END PGP SIGNATURE-----



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post Snapshot naming... 
Another way you could do it is to make symlinks from /backup into
.snapshots/daily.0, something like this:

cd /backup/.snapshots/daily.0
for f in * ; do
ln -s .snapshots/daily.0/$f /backup
done

This would be done once-off after a first rsnapshot is done
(daily.0 is populated).

And if a new file/directory is created directly under the root,
a symlink should be made for that too.

I haven't tried this either, but I was thinking about how you
could combine rsnapshot with a warm standby drive.

You probably want to have separate copies of files like /etc/fstab
(and maybe /etc/mtab) on your /backup drive.

On Wed, Jul 20, 2005 at 11:05:06PM -0700, Nathan Rosenquist wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Michael,

I presume you want this so the second disk can double as a standby
drive in case the primary drive fails? That's an interesting idea.

rsnapshot doesn't support this as a feature specifically, but if you
add in a couple of rsync commands, it should be possible.

I would think a good strategy would be as follows.

First, let's set up the basics (I'm assuming stuff here, fill in your
own values as appropriate):

The root of your dedicated backup / snapshot drive will be mounted
under /backup/.
Your snapshot root will be /backup/.snapshots/.

Now, the backup strategy:

Do a big rsync via cron from your root filesystem to /backup/, with
exclude rules for /proc, /tmp, and of course, /backup/ itself. Run
this periodically before your rsnapshot hourly/daily/lowest interval.

After the first big sync, do a cp -al of /backup/* into
/backup/.snapshots/hourly.0/. You could also do an rsync using
link-dest, i.e. rsync / --link-dest /backup/ /backup/.snapshots/. The
important thing here is that you're hard linking the files from
/backup/* into /backup/.snapshots/hourly.0/

Set rsnapshot up to use /backup/.snapshots/ as its snapshot root.
rsnapshot's one backup point (for localhost anyway) would be /backup/.
Run it normally, immediately after the rsync cron job above which
syncs the root filesystem into /backup/.

If you plan on ever booting from the backup drive, don't forget to run
LILO or grub (or whatever) on the snapshot drive and test to make sure
it works.

You should now (in theory) have a bootable, dedicated backup drive,
with the unique property of having the "main" filesystem hard linked
directly into the snapshots. If you ever boot off this drive and use
it as your primary, any files you change without older versions will
lose their history, but it is an interesting dual use.

If you do any of this, make sure and post here and let us know how it
goes. This is all theory, but I see no reason why it wouldn't work
very well.

If there is enough interest, I might be able to work something like
this into rsnapshot proper, though I'm not sure what exactly without
giving it some more thought. If anyone has any clear ideas about how
this could be done, I'd be interested to hear them.

Thanks,
- -Nathan

My hope would be that all of the files on Disk 2 contain the latest
snapshot from disk1 and that the .snapshot's directory would
contain older snapshots. Has anyone been able to accomplish
something like this? The end result would give you a second disk
that contained all files/dir located in the same directory
structure when mounted as the first disk along with the additional
.snapshot directory containing older snapshots.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFC3zsSgBvN4A95aoYRAhyrAJsGfJ14KbIlVit4ejKxUEzLjLQlfgCgwqk0
IyNAzcaVJ+JTiV8/yyow/A8=
=AHwJ
-----END PGP SIGNATURE-----



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

--
___________________________________________________________________________
David Keegel <djk < at > cybersource.com.au> http://www.cyber.com.au/users/djk/
Cybersource P/L: Linux/Unix Systems Administration Consulting/Contracting

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB