[Top] [All Lists]

RE: xfsdump/xfsrestore question

To: "'Iustin Pop'" <iusty@xxxxxxxxx>
Subject: RE: xfsdump/xfsrestore question
From: "Leon Kolchinsky" <leonk@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 26 Feb 2007 15:14:34 +0200
Cc: "'Olaf Fr?czyk'" <olaf@xxxxxxxxxxxxx>, "'Timothy Shimmin'" <tes@xxxxxxx>, <xfs@xxxxxxxxxxx>
In-reply-to: <20070224151026.GA16887@xxxxxxxxxxxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
Thread-index: AcdYJqomKUmgSxFqT36uI4B9WABjKABaxotQ
> On Sat, Feb 24, 2007 at 05:04:33PM +0200, Leon Kolchinsky wrote:
> > Now, when I've tried to make non-interactive xfsdump I'vo got > prompt
> with
> > no action, like this
> > # xfsdump -f /data/backup2.file -L 'session1' -M 'media1" /
> > >
> > #
> >
> > So, I've got to Ctrl+C the process.
> >
> > Questions:
> > 1) What could be the syntax problem in the above command?
> > 2) Any examples for incremental xfsdump (non-interactive, i.e. run from
> > cronjob) would be very welcome (and also comments about xfsrestore from
> > these backups).
> My non-interactive backup is (fragment from a script):
> xfsdump -e -l $level -L "dump $lv at $day" - /$lv | gzip -v9 > $dest_file
> and it works without prompts. Combining this with LVM snapshots also
> makes consistent backups.

Thanks Iustin. It's very usefull.

So for non-interactive dumps I can use something like:
# xfsdump -e -l 0 -L "dump hda1 of `uname -n` at `date +%F`" -M "file" -f
/data/backup0.file /
# xfsdump -e -l 1 -L "dump hda1 of `uname -n` at `date +%F`" -M "file" -f
/data/backup1.file /
# xfsdump -e -l 2 -L "dump hda1 of `uname -n` at `date +%F`" -M "file" -f
/data/backup2.file /

The above is clear :)

The question now is how to maintain these dumps accordingly to
the inventory database in /var/lib/xfsdump/inventory.
I believe that if I just delete dump file, the inventory database won't be
updated, right?

Lets say, I did level 0 dump on Sunday and a 1,2,3,4,5,6 level backups on
the following days (all with different filenames o fcourse). So at the end
of the week I end up with 7 dump files.

I want this automatic procedure to continue to the next week with the same
filenames, so no additional files would be added and no disk space would be

I came up with this:
To remove the dump session in the inventory which is identified by the mount
point, was created prior to the specified date, and media_lable
xfsinvutil -n -m media_label -M mount_point mm/dd/yyyy

# DATE=`date +%m/%d/%Y`; xfsinvutil -n -m file0 -M vod:/ $DATE
# rm /data/backup0.file

I'll run the above 2 commands prior to xfsdump cronjobs. :)

This is my solution. If you have any comments/suggestion you are very

Best Regards,
Leon Kolchinsky

<Prev in Thread] Current Thread [Next in Thread>