Re: Risks of backing up live mounted filesystems using dump(8)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Once upon a time, Russell Miller <[email protected]> said:
> In my experience, a remount can be done on a running system, so I imagine that 
> loss of data isn't something designed into that particular operation.
> I've done it successfully on each server in a running cluster of about 50 when 
> I wanted to set it to noatime.

noatime is different than ro.  For a remount,ro to succeed, no process
can have a file handle open on the filesystem for writing.  Also, there
can be no deleted files still in use (deleted executables still running,
open files that have been deleted, etc.).

A better way is to use LVM.  Put the filesystem in question on a logical
volume, leave some space free in the volume group, and then take a
snapshot when you want to back it up.  Mount the snapshot at a different
mount point and back it up however you want (dump, rsync, whatever).
This way, you get a backup of a moment-in-time.

If you are running a database that can freeze and sync all files on the
disk (e.g. MySQL "flush tables with read lock"), you can write a script
that flushes and locks the database(s), snapshots the underlying
filesystem, and the releases the locks.  With just a moment's pause, you
get consistent backups of the database files.

You do have to leave enough space in the LVM volume group that is
otherwise unallocated to handle all changes to the original filesystem
for the duration of the backup (and don't forget to delete the snapshot
at the end of the backup!).

Chris Adams <[email protected]>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.
users mailing list
[email protected]
To unsubscribe or change subscription options:

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux