Can I backup clone of my operating hard drive, on the same computer?
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.
Can I backup clone of my operating hard drive, on the same computer? This is in case my operating hard drive crashes.
Your question is confusing...same COMPUTER, or same HARD DRIVE? If you have multiple hard drives in your system, backing up from one to the other will give you some protection, since odds are only one will fail at a time. If you have only one drive, it's pointless, since if it crashes, it takes your backups with it.
To add to hydrurga's and TB0ne's posts, I also recommend that you do not try to back up the OS portion while it is running.
If you intend to back up your user data then you can do this while you are operating, but not running any programs accessing your user data.
Based on your original question where you ask about cloning your operating hard drive. Yes, you can clone it, but you should not do this while it is operating. Therefore a Live boot media such as a DVD or Thumbstick are best to use to boot the system. Next you'll need a same sized, or larger hard drive than the one you intend to back up as the target. From there you can use the sudo command and the dd command. You'll have to understand which drive is the source and which drive is the target.
Some issues here, and why I'm not posting the command suggestion, are:
The dd command using the sudo modifier is powerful and if you get it incorrect, you can destroy your existing hard drive, thus doing the exact opposite of your intentions
This type of back up, which great, is also somewhat special. No arguments the result will be effective, but ensure that you'd know what to do if you ever needed to restore, otherwise why bother going through it unless you've also learned how to make use of the archive
These are just some thoughts in preparing, or deciding as to whether or not this back up choice is best for you.
An earlier question of mine asked about just your user data. This can be done just using a File Manager, or the cp command and the correct directory top level. However you need to evaluate if you wish to backup the entire system or just your user data.
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Rep:
Quote:
Originally Posted by stephenmatthias
Can I backup clone of my operating hard drive, on the same computer? This is in case my operating hard drive crashes.
Don't know if you have any cloning app in mind but, clonezilla is a good choice. You've got some very good advice from the posters above, who are all very knowledgeable people here.
I boot from a live version of linux, so that no hard disks are operating.
Then I mount the disks & clone one of them to an external disk - (actually I use rsync to copy the files and directories etc).
Any backup is usually better than none. More backups are better than one and so on. Your backup plan should suite the value of your data. You may not need to backup the OS. Your unique data may be all that you would need.
Thank you to all who replied to my question. I will try Deja Dup for a while. I was concerned about preserving the system state as regards nVidia drivers and screen resolution and such.
Like others, I would suggest procuring a suitable backup tool and an external drive. Use a tool that is based on rsync technology so that it makes a secured file-by-file copy, avoiding temporary files and volatile files such as swap-files. It probably does not need to duplicate system files as you can re-create those.
The OP is concerned about maintaining his current configuration - video drivers and screen resolution.
Which is why I suggested a full clone of everything.
The more usual methods use rsync applied to selected non-system files to give a file-level backup.
I use backup2l for my file-level backups to a local disk, followed by a periodic rsync to a NAS drive.
It's a command line tool - but uses cron to schedule daily backups, so its (almost) a set it and forget it program. http://backup2l.sourceforge.net/
To add to hydrurga's and TB0ne's posts, I also recommend that you do not try to back up the OS portion while it is running.
If you intend to back up your user data then you can do this while you are operating, but not running any programs accessing your user data.
It's possible, but you should use special software. Ideally, you'd start up from a different drive or at least partition before backing up your main disk/partition to a separate device.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.