I have began written up documentation and placing them at http://flip-edesign.com/docs/
|
||||||
|
I have began written up documentation and placing them at http://flip-edesign.com/docs/ Say that you are working with some data that is constantly changing, like some MySQL databases, and you are charged to take a valid backup without any data inconsistency or downtime. You may consider using mysqldump; however, this utility will lock tables during the duration of the backup and can cause down time (especially if using MyISAM table engine which performs Table level locking). Then, you think you may just copy or archive the MySQL table files (/var/lib/mysql/DB), however, this can cause data inconsistent as during the copy some of the data may of changed. Not to mention, if it is InnoDB table engine all table data is stored in the ibdata files. At this point you may be scratching your head not knowing what to do. You could stand up another server and setup MySQL replication. Unfortunately, you do not have any available server’s or workstation to setup for this purpose. Fortunately, for you, this server will setup by default with LVM (Logical Volume Management) by your distribution. Using LVM, we are able to create a snapshot of an existing Logical Volume using free space on the Volume Group. Lets go ahead and see some of the syntax and examples below. Below we have our Logical Volume mounted on /var/lib/mysql.
So lets go ahead and check out the information about this Logical Volume.
Now lets check the Volume Group this Logical Volume is apart of and see if there is any free space.
As we do have an available 420 MB or 105 PE (Physical extents) lets go ahead and create a snapshot, mount it and view its contents.
Now we have a snapshot of our MySQL data which will not change even though the live data mounted at /var/lib/mysql is contently changing. Using this snapshot we can safely copy the contents and if need be use for a restore in the future. Hey just wanted to throw out there a new project I have been working on, its a site which has rotating Linux Questions. Have a look at http://dailylinux.info |
||||||
|
|
||||||