[SOLVED] What is the easiest way to re-install full system from a backup in my case?
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.
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.
Distribution: Linux From Scratch, Slackware64, Partedmagic
Posts: 3,137
Rep:
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.
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.
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.
Distribution: Linux From Scratch, Slackware64, Partedmagic
Posts: 3,137
Rep:
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.
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.
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.
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.
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.
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)?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.