How to Create System Recovery Partition in Linux Ubuntu
Hi folks, I've recently switched my HTPC from Windows 7 to Ubuntu 12.10 64bit. I want to create a snapshot of the OS partition so I can easily restore if needed.
My HTPC has 1 hard disk which has 3 partitions. 1. 70GB Ubuntu (7GB used) 2. 2GB Swap 3. 75GB New (Unallocated) I would like to achieve the following:
I've been reading through my copy of the Linux Bible and other tutorials and I want to put some of this theory into practice. So far I was thinking of doing the following:
Am I on the right track? Could someone suggest best practice approach for this outcome? Cheers, Pete |
i would add zeros to the end of the disks like so:
Code:
dd if=/dev/zero of=some/big/file Code:
dd bs=8192 if=/dev/sdd | bzip2 > xbmc-01.05.2011.iso.bz2 # to create the image |
Why not backup...
You can of course make a system recovery partition on your present HDD, but I would think that you'd be better off if you instead relied on a good chronological backup program for your system or for its important files. As a true backup, on another HDD, internal or external, you guard against failure of your HDD. That is the total loss of everything on your system. not just an annoying but repairable episode you can fix with a recovery partition. Unless you're running a server or some critical always-on application, I wouldn't think you'd have to worry about your linux OS going down, causing chaos, taking everything with it and loosing your files. That is unlikely; your linux installation is more robust than Windows and if needs be, easier to re-install. I could always add that as a wise and experienced linux user you already have backup and really only need to think of a way to configure it to satisfy your current wishes. Could I be wrong? I use the program Back in Time which is incremental but doesn't use compression, copying to an external HDD with an SATA connection. The files being without compression makes it easier for me to copy everything back to my installation HDD as I want. When the time comes, I can just format my HDD to do a new installation of openSUSE or mess things up by fooling around with some new distro. |
Quote:
|
Quote:
the internal hd has 250 gb of movies and music that is also saved on my phone, camera and mp3 players. so that if i accidentally delete something i can manually copy it from wherever. i think images make sense when they are as small as possible and they contain just the core os and various configs. incremental backup makes sense for actual data recovery. |
Thanks for your replies everyone.
This HTPC is dedicated to run XBMC and act as the upnp server. So far it's only using around 7GB in total. I bet I could make it leaner too because it has ubuntu unity desktop environment installed which is a waste of space. The media is stored in a separate Freenas server. I have to lean towards Schneidz that making a partition image backup would be ideal due to the considerably small 'used partition space'. Maybe what I'll do is reduce the size of the main partition from 70GB to 8GB. This way the image of the partition will be small and I can write a script to alert me when the partition is running low on space or perhaps automatically grow the partition size by booting into gparted iso... I came across this post http://ubuntuforums.org/showthread.php?t=1549847 which shows you how to create a grub 2 option to boot to an iso (maybe clonezilla or ghost4linux) so I'll test out this tomorrow and report back. |
Don't forget you need a system with enough capability to restore it...
And you better test it when you do. |
Just thought I've give you guys an update.
Hey folks, I've had a hell of a learning experience over the past week!
This is what I've managed to do so far:
When the system rescue boots (from sda3) it runs the xbmc_backup.sh which sits on the nfs fileserver but only after I manually mount the nfs partition. Things to do:
fsarchiver backed up the xbmc partition (used 4.8G out of 9.8G) and saved a compressed backup file less than 3.0G. The backup ran for around 11 minutes. |
All times are GMT -5. The time now is 02:04 AM. |