Re: Safe fsck / consistent backup while mounted

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

 



On Sat, 2011-06-04 at 12:25 +0200, Martin Steigerwald wrote:
> Hi!
> 
> Now I thought about a way to safely backup a MySQL or other database - 
> without long service interruption:
> 
> - Tell DB to turn itself into consistent state and freeze there
> - sync / btrfs filesystem sync ; fsfreeze -f /mountpoint
> - btrfs subvolume snapshot
> - fsfreeze -u /mountpoint
> - Tell DB to continue business as usual
> 
> My questions are:
> 2) Is the sync needed?

I'm not sure. In some cases it might not be: E.g. If the database uses
fsync() to save the data when you tell it to go into a consistent state,
there would be no need to have a separate sync. It shouldn't hurt,
however.

> 3) Is the fsfreeze needed at all? Does btrfs subvolume freeze the 
> filesystem prior to the snapshot? The manpage doesnÂt tell it.

The fsfreeze should not be needed. The btrfs subvolume snapshot command
takes an atomic snapshot of the current subvolume state.

-- 
Calvin Walton <calvin.walton@xxxxxxxxxx>

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux