On Sat, Dec 23, 2006 at 08:05:58AM +0000, Craig Skinner wrote:
> I thought it was best pratice to umount a slice before dumping, but a
> quick flick thourgh the man page states:
>
> files-to-dump is either a mountpoint of a filesystem or a list of files
> and directories on a single filesystem to be backed up as a subset of
> the filesystem. In the former case, either the path to a mounted
> filesystem or the device of an unmounted filesystem can be used. In the
> latter case, certain restrictions are placed on the backup: -u is
> ignored, the only dump level that is supported is -0, and all of the
> files must reside on the same filesystem.
>
>
> I have been umounting to dump with this in a script:
>
> dump -${level}anu -f - -h 0 ${device} | gzip -9 -o ${file}
> Am I best not to umount /home, /var/whatever before dumping? Would save
> killing apps and interrupting users.
I interpret the above snippet to mean `dump works best on filesystems,
not files'. As to unmounting before dumping, that's possible but, IME,
not usually necessary.
Of course, you *do* have to know what you are doing. Dumping a running
/usr is pretty much okay - it's not going to change, after all. On the
other hand, dump and PostgreSQL aren't friends (which is why pg_dump is
useful, this creates a backup in a file).
My backups run at night, when very little things are using the machines;
but I do not unmount (or mount read-only) any filesystems before dumping
them.
However, if you can get away with unmounting stuff, it might be
preferable. I just never bothered.
Joachim