Linux - NewbieThis 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!
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.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
In general no (simple) backup solution is valid for a running system. Unless of course you can be sure nothing being backed up is being updated. When I need to do something like that I do it from single user to minimize the exposure. And I agree, dd is about the worst option.
DD because I haven't really heard of any real alternatives. I tried to set up a RSYNC backup solution before and it was just too difficult (I needed it to be secure/over SSH) so I nixed it.
I basically want to make a whole drive backup without having to disrupt the running server and that I can easily restore (from a recovery/restore boot disc) like ShadowProtect does for Windows or the built-in Windows backup feature for Windows Server 2008 and Vista/7.
Regardless of what people say above, no solution is ok for a running system. The issues are likely to be minor on a desktop system, on systems with higher loads the thing starts getting creepier.
The right solution to your problem is called "snapshotting", and it's a feature that some file systems have. In solaris there's zfs, which implements this feature. In linux there's no mature fs that supports it (btrfs does, but it's nowhere near mature, and the zfs port for linux is FUSE based, and it's not mature either). So, the only option that's left is to use lvm (logical volume manager).
A snapshot is basically a photo of your disk on its current state, you take the photo, then backup that. It's an oversimplified explanation of course, but the key is that this way you ensure that nothing is going to change while you are doing the backup, and so, the backup will be 100% consistent, no matter what your system is doing at the moment. Taking the snapshot is quick, just a second, and you can clean it afterward.
The only downside is that migrating to lvm if you are not using it already can be a pain if you don't have enough free space to do it incrementally. Another downside (if you are a GUI fan) is that there's no decent GUI for lvm (that I know of).
You can start googling for "lvm snapshot" and read a bit until you get the concept, then change that by "lvm snapshot backup" to discover the rest. As said, if you take this course of action, your main problem right now would be the migration to lvm.
ps. I guess you already know this by now, but *never ever* do a backup with dd of a system that's mounted as 'rw', you will get a broken fs image almost for sure. A single disk write is enough to get a broken fs inside your disk image, how bad that will be depends on the fs and the number of write operations.
Anyhow, a good understanding of commands you type is necessary. For instance, not knowing enough cp command's options I recently ended up with files properly copied... But the timestamps, not preserved
Last edited by Didier Spaier; 11-13-2009 at 03:19 AM.