Re: xfsdump/xfsrestore question

Justin Piszcz
2007-02-20T14:20:09Z

On Tue, 20 Feb 2007, Leon Kolchinsky wrote:

> Hello All,
>
> I have a question about xfsdump/xfsrestore usage on Linux.
>
> I'm running Linux 2.6.19-gentoo-r5.
>
> Now I have 2 disks,
> /dev/hda is my system disk
> /dev/hdc is a disk I want to use for backups.
>
> This is how my fstab looks like:
>
> /dev/hda1 / xfs
> noatime,nodiratime,logbufs=8 1 1
> /dev/hda2 none swap sw
> 0 0
> /dev/hdc3 /var/tmp/portage xfs
> noatime,nodiratime,logbufs=8 0 0
> /dev/hdc2 /data xfs
> noatime,nodiratime,logbufs=8 0 0
> /dev/hdc1 none swap sw
> 0 0
> /dev/cdrom /mnt/cdrom iso9660 noauto,ro
> 0 0
> /dev/fd0 /mnt/floppy auto noauto
> 0 0
>
> # NOTE: The next line is critical for boot!
> proc /proc proc defaults 0 0
>
> shm /dev/shm tmpfs nodev,nosuid,noexec
> 0 0
>
> ########################################
>
> Now the questions:
>
> 1) If I get the xfsdump synax correctly I just have to do:
>
> # cd /
> # xfsdump -f /data/backup.file /
>
> Is it right?
> What about opened and "currently in use by the system" files? Are they
> backuped in a proper way? What about tmpfs like /proc, are they been
> ignored?
>
> 2) If I'd have to restore my system from the dump, how would you recommend
> to do it? Booting from LiveCD and making # xfsrestore -f / data/backup.file
> / ?
>
> Would it be a bootable/operational system?
> What are the expected glitches?
>
>
> Best Regards,
> Leon Kolchinsky
>
>
>

This generally looks correct, there are some options to name the tape/ID
of the backup itself, you can specify them on the command line.

For ignoring certain paths, yes this works as well, you can chattr I
believe (check the manpage) certain directories / files and they will be
ignored by xfsdump.

Justin.