LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can I backup clone of my operating hard drive, on the same computer? (https://www.linuxquestions.org/questions/linux-newbie-8/can-i-backup-clone-of-my-operating-hard-drive-on-the-same-computer-4175604170/)

stephenmatthias 04-19-2017 12:00 PM

Can I backup clone of my operating hard drive, on the same computer?
 
Can I backup clone of my operating hard drive, on the same computer? This is in case my operating hard drive crashes.

hydrurga 04-19-2017 12:08 PM

Quote:

Originally Posted by stephenmatthias (Post 5699276)
Can I backup clone of my operating hard drive, on the same computer? This is in case my operating hard drive crashes.

Yes, you can. I would recommend however that you back it up to an external device in case your laptop gets stolen, gets destroyed completely etc.

TB0ne 04-19-2017 12:09 PM

Quote:

Originally Posted by stephenmatthias (Post 5699276)
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.

Backing up to external media is ALWAYS better.

rtmistler 04-19-2017 12:17 PM

Hi and welcome to LQ.

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:
  1. 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
  2. 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.

jsbjsb001 04-19-2017 12:50 PM

Quote:

Originally Posted by stephenmatthias (Post 5699276)
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.

JeremyBoden 04-19-2017 02:04 PM

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).

jefro 04-19-2017 02:46 PM

Hello and welcome to LQ.

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.

stephenmatthias 04-27-2017 07:08 AM

Thank you to all who replied to my question.
 
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.

JeremyBoden 04-27-2017 07:16 AM

You might find that a bit for bit clone onto a another disk would meet your requirements better.

sundialsvcs 04-27-2017 07:55 AM

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.

JeremyBoden 04-27-2017 08:28 AM

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/

Laserbeak 04-27-2017 08:34 AM

Quote:

Originally Posted by rtmistler (Post 5699287)
Hi and welcome to LQ.

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.

stephenmatthias 04-27-2017 02:43 PM

I will get the external hard drive tomorrow.
 
Thanks a lot everyone.


All times are GMT -5. The time now is 08:20 PM.