LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   What is the easiest way to re-install full system from a backup in my case? (https://www.linuxquestions.org/questions/linux-newbie-8/what-is-the-easiest-way-to-re-install-full-system-from-a-backup-in-my-case-4175567775/)

grigory 01-24-2016 05:59 AM

What is the easiest way to re-install full system from a backup in my case?
 
Hello!

I'm aware of a zillion way to create a full system backup/disk image etc. But to me it's unclear as to how to use it after hard disk failure (or it's being stolen etc.).

I've got a dual-boot (w/ GRUB 2) W10/Ubuntu 14.04 Desktop laptop. Laptop's internal HDD is where W10 lives and Ubuntu resides on external HDD, connected via USB3 cable. My / partition is about 20 GB (half of it is full by now). Plus I've got /home partition which has about 6 GB of my personal files (nothing is too important though).

Now... what I'm asking is... How would I be able to restore my Ubuntu system? Let's say if I create a DVD image, but the size of the DVD is about 4 GB (if not less). But my / files weigh around 10 GB. Or maybe if it's zipped, then it would fit on one DVD? Or maybe the restoration application could use a multi-volume backup from a few DVD's? And if it's not a DVD, let's say I would keep the backup as a file in a cloud somewhere, then what? Let's say my external HDD with Ubuntu on it failed and all I have is a working internal HDD with Windows and a full backup of my current Ubuntu install. Then what? I know that there's a Deja Dup already present in the system. Though I've never used it so far. Would it fit my purpose? Or I'd better use a 3rd party application? Some even propose a CLI tools in the terminal for full system backup. Go figure! It's a labyrinth for me.

syg00 01-24-2016 07:03 AM

You cannot restore without knowing what format the backup was. If you don't know, how can we know ?.

Keith Hedger 01-24-2016 07:51 AM

Most backup applications come with a corresponding restore application ( not rsync as you just reverse the direction ), so how you restore a backup depends on how you made it in the first place.

grigory 01-24-2016 04:25 PM

Quote:

Originally Posted by syg00 (Post 5486631)
You cannot restore without knowing what format the backup was. If you don't know, how can we know ?.

Please re-read my original post. You're trying to answer the question I haven't asked. Let me repeat what I've asked.
I was asking about the RECOMMENDED way of making a backup, so the restoration process would be painless.

grigory 01-24-2016 04:31 PM

Quote:

Originally Posted by Keith Hedger (Post 5486645)
Most backup applications come with a corresponding restore application ( not rsync as you just reverse the direction ), so how you restore a backup depends on how you made it in the first place.

I know that. But that's not what I ask. Again, I'm asking about the best way to MAKE a backup, so it would fit my goal (which is ideally to get a backup file small enough to send it to the cloud or put it on a USB flash drive). Something below 50 GB in size. Also so that the restoration process would be relatively easy.

Keith Hedger 01-24-2016 04:37 PM

What the best backup solution is for you is for you to decide, there is no 'BEST' way to do it, for instance will you be using a recover partition or will you be booting from a cd/dvd, you need to choose, if you have any particular problems then feel free to post them.
Personly I use dump/restore from a recovery partition with a static buikd of dump , and a large external usb drive.

grigory 01-24-2016 05:51 PM

Thanks again for your reply!

I'm aware that it's up to me to decide, but I have to know my options to reach a decision. Okay let me tell you again what I want. I want to have a movable backup file. The file that could be put either in the cloud or on a USB flash drive. Something below 50 GB in size. Obviously, it CAN'T be any partition, can it? Partition resides on HDD. And if something bad happens to the disk, how that partition would help me? I don't mind booting from a DVD if I have to.

Most people suggest either CloneZilla or a tarball. I wonder what's the difference and what pluses and minuses each option has. And what's more importantly which option would fit my goal better. Like I said, the size of HDD is 250 GB. My whole / partition is 20GB in size. It's half full. So the system files of Ubuntu weigh around 10 GB. The size of /home is over 200GB, but it's almost empty. Only 6 GB is used. In other words, my disk is 90 percent free.

grigory 01-24-2016 06:20 PM

P.S. I wonder why nobody recommends me Deja Dup. It doesn't do the job or simply isn't good enough?

syg00 01-24-2016 06:53 PM

So you only want a single point-in-time copy that you can restore an entire filesystem from ?. For that I use fsarchiver. Create a backup for your system partition, and another for /home - only the used data gets backed up (compressed), and it is CRC checked. You will have 2 files you can put where-ever you want. Not point-and-click as a restore source since you need to create partitions to restore into, but a good tool.
Edit: - couple of points I forgot to mention:
- backup from a liveCD to ensure the system is completely idle and pseudo files like /proc aren't an issue.
- grub usually needs to be re-installed after a full system restore.
- I usually don't bother backing up the system, I rebuild it from scratch.

Different scenarios need different solutions - most people only want changed files backed-up on a regular basis, some want all copies kept so they can roll back to a particular version/time, some (most ?) just want the latest. As a general tool rsync is the usual answer - it is (or was when I looked) the back-end doing the work in deja dup (which is just a GUI front-end to duplicity, which uses rsync ...).
Only way to find out if you like deja dup is to try it - you should be able to restore using a Ubuntu liveCD in need, but I've never looked at it.

michaelk 01-24-2016 07:47 PM

Lets start at the beginning. There are basically three types of backups.

Bare metal i.e. clonezilla, an image is created using a live CD/USB and you can backup and recover your computer to a fully bootable system again.

File and directory - from basic utilities like cp and tar to deja dup, bacula etc either full or incremental. If you have a hard drive failure then you need to reinstall the base operating system then restore your backup. Recovery is just a matter of running that particular application or utility.

Application specific - The prime example are databases which typically have there own routines.

I favor an external hard drive over DVDs or flash drives. Re-writable media has limitations for long term storage and cheap flash drives or just that cheap...

So you need to decide what method bets suits your needs. The limitation of clonezilla is the destination needs to be equal or larger than the source. I've never played with deja dup but it uses rsync as the backend.

JJJCR 01-24-2016 10:53 PM

agree with Michaelk, Clonezilla is good to make a clone of your system. But of course you need to do an incremental backup for those directories that change data.

sidzen 01-25-2016 12:39 AM

FYI - deja dup
 
deja dup

grigory 01-25-2016 12:41 PM

syg00,
Okay, I understand that if I want to backup my root file system, then I should boot from SystemRescueCd (I'm downloading its ISO right now) and it has FSArchiver on that boot disc. So after I boot what exactly I have to do? Is it distro-specific (I use Ubuntu) or not?
And one more thing... Let's say I've got the backup file made with this tool you've recommended. After that my HDD dies at some point in time. Then what? Should I install my Ubuntu Desktop as usual (without touching its defaults after the installation) and then to boot again from SystemRescueCd and use a certain command to restore the root FS from the backup file I created previously? That way my / file system will become exactly as it is now?

michaelk,
"If you have a hard drive failure then you need to reinstall the base operating system then restore your backup" -- You mean that I would have to install my Ubuntu Desktop as I did the first time (the basic usual installing without touching its defaults) and then to use the restoration tool to update my newly-installed Ubuntu Desktop installation for it to be exactly as it is now ("now" in this context means prior to the HD drive failure/restoration)?

suicidaleggroll 01-25-2016 12:52 PM

Quote:

Originally Posted by grigory (Post 5487200)
michaelk,
"If you have a hard drive failure then you need to reinstall the base operating system then restore your backup" -- You mean that I would have to install my Ubuntu Desktop as I did the first time (the basic usual installing without touching its defaults) and then to use the restoration tool to update my newly-installed Ubuntu Desktop installation for it to be exactly as it is now ("now" in this context means prior to the HD drive failure/restoration)?

Yes, if that's the backup method you choose to use (it's my preferred backup solution). A full image backup SOUNDS convenient, since you just restore it and you're back in business, but it is a PAIN to keep up with and maintain. You're making your life harder every time you make a backup so that your restore process, if you need to use it, is maybe 30 minutes shorter. Just doesn't make sense to me.

grigory 01-25-2016 01:24 PM

suicidaleggroll,
Thanks for your reply! Well, I want to try both ways to see everything in a real life.


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