[mylvmbackup] Re: mylvmbackup & rsnap + also 1 tiny suggested change

Hi Matt,

thanks a lot for your message!

On Fri, Jul 18, 2008 at 6:10 AM, Matt Lohier <mlohier@xxxxxxxxx> wrote:

> Thank you Lenz for your work on mylvmbackup v0.9. It's very good!
> I use it to backup 100GB of mysql database.

Glad to hear it is working fine for you!

> I tried the tar option: fine. I'd like to use that for a weekly backup.
> And at the same time i wanted to create daily snapshots using hard-links
> (but not full backup like a tar.gz) and keep a few of those - a week worth.
> rsync helps here but it would not provide the history that i would like to
> have (nor the hard links).

Yes, the current rsync implementation creates a full copy of all
databases every time.
I wanted to look into utilizing hard links to save disk space (as
rsync provides that as well),
but have not worked on that yet.

> rsnap (courtesy of Daniel Lorch [http://daniel.lorch.cc/projects/rsnap/]) is
> based on rsync and can provide multiple snapshot using hard links. It's
> similar to rsnapshot (which you want to add support for I read - and i look
> forward to that) but simpler because you can configure only one set/type of
> snapshots (not like rsnapshot with daily/weekly/monthly snapshots and the
> necessity to run it at various schedules/cron). So it's very easy to add
> support for it.

Thanks for the hint! It indeed looks easier to use than rsnapshot.
I've to take a closer look
at how it works and how this could be implemented in mylvmbackup.

> I modified your script to add support by copying the rsync system call and
> now calling rsnap instead. With rsnap though you cannot take a backup of pos
> files or config file because rsnap only expect a single source for the
> backup (your mnt point). Also the temp destination cannot be used, it gets
> backup straight to the destination - cannot rename temp dest because of the
> sub-directories for the snapshots.

Gotcha. Looks like it's time to make the backup part more modular, so
it's easier to support
additional backup tools. And I agree, having everything in one
subdirectory may make it
easier. The temporary directory is more of a convenience/safety thing,
to indicate that a
backup is either in progress or incomplete.

> I added support/configuration for rsnap similarly in config file. And that
> was all that was require to keep multiple rsynced snapshots (using hard
> links).
> Do you think it's a good thing to add to your already brilliant script?

I certainly would like to take a look at it! Could you send me a patch
against 0.9?

> On a separate note (with Centos) when run from cron the lvs system call
> could not be resolved - so i added a config option in config file also for
> lvs (like lvcreate...) that was missing and the LV stat display was failing
> for me.

Hmm, I've seen one other report about this some time ago and could not
figure out why
this happens. I assume it's because /sbin is not in $PATH for the cron
job and the script
defaults to "lvs" (without path) if there no other option given in the
config file. Adding it to the config file
is the appropriate fix, will do that right away so it's fixed for the
next release.

Thanks!

Bye,
    LenZ

Other related posts: