Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
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.
|
|
04-11-2017, 06:09 AM
|
#1
|
LQ Newbie
Registered: Apr 2017
Posts: 4
Rep:
|
LVM Snapshots
hi,
I am unclear on which do I backup. Do I backup the lvm logical filesystem or the mounted snapshot directory? signed confused...
|
|
|
04-11-2017, 06:14 AM
|
#2
|
Senior Member
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375
|
What do you mean by which do you back-up? What are you using to do the back-ups.
How are you looking at backing up the lvm logical filesystem? backing up the entire filesystem would be better from a bare metal restore perspective but you need to make sure you back-up everything and not just the COW file/data. doing it from a mounted directory maybe easier however and would mean you are doing file level back-ups instead, it'd make doing a bare metal restore a much longer process but restoring individual files maybe easier, based on what you are using to do the back-ups.
|
|
|
04-11-2017, 07:49 AM
|
#3
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,285
|
The reason for taking a snap is to get a point-in-time consistent image of the filesystem. Back that up.
In all likelihood the base filesystem will be changing continually, so is inappropriate as a backup source.
|
|
|
04-11-2017, 08:08 PM
|
#4
|
LQ Newbie
Registered: Apr 2017
Posts: 4
Original Poster
Rep:
|
I found the answer too doing more searches. It is the mounted snapshot that I make the backup from.
|
|
|
04-11-2017, 08:21 PM
|
#5
|
Senior Member
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375
|
Maybe I misunderstood, I thought you were talking about actually just copying the logical volume of the snapshot itself.
Anyways, depending on what you are doing, a snapshot alone might not be enough. For example, if you are using mysql/mariadb, then you'd also have to take the step of read-locking the entire thing prior to creating the snapshot, once the snapshot is created you can kill the global read-lock. In short, always make sure your back-up method is appropriate to the task you are doing.
|
|
|
04-11-2017, 10:03 PM
|
#6
|
LQ Newbie
Registered: Apr 2017
Posts: 4
Original Poster
Rep:
|
Isn't the purpose of a snapshot is to make a backup of the system while users are still doing their usual business on the system. Also from what I read, backing up from the snapshot allows mysql or other services to remain active as users read and write to it. Also, I read the snapshot is just to hold changes that are being made in the filesystem you made a snapshot of.
|
|
|
04-11-2017, 11:06 PM
|
#7
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,285
|
Quote:
Originally Posted by r3sistance
In short, always make sure your back-up method is appropriate to the task you are doing.
|
Keep that in mind, after which you can do whatever is appropriate.
Do you require referential integrity, can you withstand the time delay of trans roll-back during restore ... ? All sorts of issues pop up.
For non-DB filesystems, the system handles freezing the I/O - snaps are a no-brainer in that case. As for only holding "changes", the snap actually holds the unchanged (initial) version of any data that changes subsequent to the snap being taken. Hence they can grow over time. However it has reference to the entire filesystem, so you can take a full backup using the snap.
Snaps are in themselves not a robust backup - but they are excellent sources for backups.
|
|
|
04-12-2017, 12:03 AM
|
#8
|
LQ Newbie
Registered: Apr 2017
Posts: 4
Original Poster
Rep:
|
I am new to LVM so I can't debate on the proper usage or any prerequisite to be done before doing the snapshots. You both can be right. There are tons of info on LVMs and some are dated too. Maybe I'll practice LVM snapshots on a spare desktop.
Last edited by PrideOfUsingLinux; 04-12-2017 at 12:05 AM.
|
|
|
All times are GMT -5. The time now is 01:48 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
|
|