Cloning a hard drive while being used in Production (no unmounting allowed)
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!
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.
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.
Cloning a hard drive while being used in Production (no unmounting allowed)
Hello everyone, great resource you have here, I'm very glad it exists. Now let's cut to the chase. I have a webserver which is in production and I absolutely can not take offline, turn it off or unmount any drives or partitions. Now I need to make a clone of this drive as soon as possible, so that if anything happens I can just turn on my backup machine(same specs as the production server) and it will be as good as new and up and running again.
I've heard dd can do this but it requires the drive to be unmounted while the process is going in order to keep consistency.
Is there any other way of cloning my harddrive while it's in production?
I can plug in a USB drive if need be.
If not, is there a way of at least backing up most of the files in order to have a really fast way of bringing the system up if something were to happen?
I am using red hat 7.1. I could definitely do that but I don't have much time I am trying to do this backup before I leave work today. that's in about 3 hours... I know I should have done it a long time ago.
also what happens if I run dd without unmounting the drive? will it mess up the production server or just the "backup".
I've run dd without unmounting any drives about 4 times today, all with no appreciable problems. If this is a webserver, your logs are likely to be garbled due to the constant appending that happens, but you can rsync those over, after the procedure, if need be.
Just do it with dd. Then mount the image and wipe out the contents of /tmp, /var/tmp, and /var/run. So long as you do that, unless you installed a package or changed a config file while dd was running, you should be fine.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.