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.
|
 |
11-11-2009, 02:30 PM
|
#1
|
Member
Registered: Apr 2005
Posts: 105
Rep:
|
Use DD while Linux is running?
I'm looking for a way to backup my Ubuntu 9.04 installation on schedule while its running. Can I back it up with DD while it's running? If not, how can I do so?
|
|
|
11-11-2009, 03:00 PM
|
#2
|
LQ Addict
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,416
Rep: 
|
Just wondering... why use dd to make a backup ? rsync is more appropriate, IMHO. And of course you can use it while it's running.
|
|
|
11-11-2009, 05:17 PM
|
#3
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,437
|
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.
|
|
|
11-12-2009, 02:50 PM
|
#4
|
Member
Registered: Apr 2005
Posts: 105
Original Poster
Rep:
|
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.
|
|
|
11-12-2009, 03:11 PM
|
#5
|
Moderator
Registered: Mar 2008
Posts: 22,361
|
Backula maybe?
|
|
|
11-12-2009, 04:05 PM
|
#6
|
LQ Addict
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,416
Rep: 
|
Quote:
Originally Posted by digity
I tried to set up a RSYNC backup solution before and it was just too difficult (I needed it to be secure/over SSH).
|
Why too difficult ? rsync seems to be the right tool through SSH, just read the manual.
|
|
|
11-12-2009, 04:10 PM
|
#7
|
Member
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Rep:
|
rsync will do it for you. What I recommend is to do an offline backup using a system rescue cd then you can do online backups using rsync after that.
|
|
|
11-12-2009, 08:39 PM
|
#8
|
Member
Registered: Apr 2005
Posts: 105
Original Poster
Rep:
|
ramram29: good idea. I'll use that VMware ghettoVCB.sh script to do a offline style whole system backup twice a month (yes, it's a virtual machine) and use rsync for daily backups.
Didier: do you know of a good but easy to follow rsync over ssh tutorial/how-to for Ubuntu to a FTP server (is that even possible)?
|
|
|
11-12-2009, 09:43 PM
|
#9
|
Gentoo support team
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083
|
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.
Last edited by i92guboj; 11-12-2009 at 09:47 PM.
|
|
|
All times are GMT -5. The time now is 03:50 AM.
|
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
|
|