To archive a snapshot first you need to create a mongoDB snapshot, The same is discussed on post Creating a mongDB snapshot with LVM. Now mount the created snapshot and copy this to separated storage volume. Or you can create a block level copy of snapshot using following commands:
umount /dev/vg0/snap_db-01
dd if=/dev/vg0/snap_db-01 | gzip > snap_db-01.gz
Below is the description of above command sequence:
Ensures that the /dev/vg0/snap_db-01 device is not mounted. Never take a block level copy of a file-system or file-system snapshot that is mounted.
Performs a block level copy of the entire snapshot image using the dd command and compresses the result in a gzipped file in the current working directory.
Note: The above command create a large gz file in the working directory. Please insure that this directory or file system has enough free space.
0 Comment(s)