Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-27-2011, 11:38 AM
|
#1
|
LQ Newbie
Registered: Apr 2010
Posts: 5
Rep:
|
Some guidance needed on recovery using LVM Snapshots
I have read the articles suggested on using LVM and importantly Snapshots but I need o understand something about the recovery as follows:
I understand that if I lose some, but not all disks in my LVM - the LVM software will cope and I can get the data back
BUT if I lose all of the disks in the LV - and I only have a snapshot backed up on tape, can I recover all of the data ?
Do I need all of the snapshots since the last full copy ? or what ?
Also, related, can this tape backup be of any use to me if I rebuild the system, without any other data, on a new server ?
Maybe I missing something in the articles but this does not appear to be looked at.
|
|
|
01-27-2011, 11:45 AM
|
#2
|
Senior Member
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278
|
Here is a plain explanation of LVM Snapshots and how they work.
http://tldp.org/HOWTO/LVM-HOWTO/snapshots_backup.html
To answer your question, a snapshot, is not incremental. It is a full backup of whatever file system you are making a snapshot of. So, if you make a snapshot of /home/ then the snapshot will have everything that was in /home/ at the time of the snapshot.
Last edited by szboardstretcher; 01-27-2011 at 11:47 AM.
|
|
1 members found this post helpful.
|
01-27-2011, 12:09 PM
|
#3
|
Member
Registered: Jan 2011
Location: the right coast of the US
Distribution: Ubuntu 10.04
Posts: 80
Rep:
|
Hello pwl,
1st off the backup of a snapshot will contain the same data as the original volume. So, if you could do a full recovery of that backup if it was taken of the original volume, then you could do a full recovery of the same backup taken from the snapshot. [Note: since the snapshot will most likely be mounted at a different location than the original volume, you will basically have to do an out of place restore if you want to recover from tape to the original volume.]
An LVM snapshot is a Point In Time(PIT) copy of the original volume. So, if you backup a snapshot your backup will be of the volume at the time the snapshot was created.
You can use snapshots in backups in several ways.
1) Take a snapshot of the volume, backup the snapshot, delete the snapshot.
The advantage of doing this over just backing up the volume is that you only need to worry about keeping the volume in a consistent state while the snapshot is being taken, not for the whole time it takes to write the backup to media.
Also, if the snapshot is on different hard disks than the original volume, then you lessen the performance impact on the original volume.
2) Take a snapshot of a volume, backup the snapshot, keep the snapshot until the next backup.
This has the same advantage as the 1st backup wise, additionally if you need to recover data from the last backup, you have the option of recovering it from the snapshot, which would be faster than recovering from the backup media.
3) Take a snapshot every N hours and backup every M snapshot to tape.
Since a snapshot takes less time and impacts a system less than doing a full backup, it is possible to do it more often. Say you take a snapshot every 8 hours and roll every 3rd snapshot to tape. This way you would have a daily backup on tape to recover data that is older than a day or for a catastrophic recovery. Additionally, you would have a a backup from 8, 16 & 24 hours ago, that you can quickly recover from. You just need the hardware resources to do it.
You will pay a performance penalty for enabling snapshots, but I don't know if that has been quantified by anyone, especially it can vary widely depending on the usage pattern of the volumes.
[sorry szboardstretcher, I didn't mean to post over you. I'm just a slow writer and didn't see your post till I posted.]
Last edited by z1p; 01-27-2011 at 12:11 PM.
|
|
1 members found this post helpful.
|
01-28-2011, 09:47 AM
|
#4
|
LQ Newbie
Registered: Apr 2010
Posts: 5
Original Poster
Rep:
|
Some guidance needed on recovery using LVM Snapshots
Thanks szboardstretcher and z1p
I can now investigate further on this with some confidence.
And again a special thank you
|
|
|
All times are GMT -5. The time now is 12:43 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|