Hope this answers your question.
On Monday, October 22, 2012 10:34:10 PM UTC-4, Jinxuan Hou wrote:
> Hi, i have a doubt about mongodb backup using lvm snapshot.
> In the manual document(
> http://docs.mongodb.org/manual/administration/backups/), in the Backup
> With Journaling section it says that if you enable journal you can backup
> your database in following steps:
> 1.Create Snapshot
> lvcreate --size 100M --snapshot --name mdb-snap01 /dev/vg0/mongodb
> 2.Archive Snapshots
> umount /dev/vg0/mdb-snap01
> dd if=/dev/vg0/mdb-snap01 | tar -czf mdb-snap01.tar.gz
> 3.Restore Snapshot
> lvcreate --size 1G --name mdb-new vg0
> tar -xzf mdb-snap01.tar.gz | dd of=/dev/vg0/mdb-new
> mount /dev/vg0/mdb-new /srv/mongodb
> 4.Remote Backup Storage
> umount /dev/vg0/mdb-snap01
> dd if=/dev/vg0/mdb-snap01 | ssh user...@example.com <javascript:> tar
> -czf /opt/backup/mdb-snap01.tar.gz
> lvcreate --size 1G --name mdb-new vg0
> ssh user...@example.com <javascript:> tar -xzf
> /opt/backup/mdb-snap01.tar.gz | dd of=/dev/vg0/mdb-new
> mount /dev/vg0/mdb-new /srv/mongodb
> there is not lock fsync operations necessary.
> just as (http://www.mongodb.org/display/DOCS/Backups)said:As long as all
> files are snapshotted at the same point in time, you don't need to
> lock+fsync
> but when taking lvm snapshot, everything are writen to the Journal log
> ,but the data is stealing in the file system buffer or the OS buffer is
> that ok for we to recover
> our data to a consistent point .(especially when the sln No.s of Journal
> log and Filesystem snapshot are not consistent)
> *looking forward for your answer.*
> *
> *
> thank you very much .