|
||||||
| Forums FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| ARCHIVES - HowTos Discussions Have any questions about any HowTo found at the wiki? Post in here! |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
(My) Problem: In a typical (or not-so-typical) openSUSE 10.1 64bit installation with XFS filesystem take a total backup of the system that can be used to perform a bare-metal-restore on a new (larger capacity than original) hard disk...
================================================== ========================== Difficult points: a. ext2/ext3 is supported by popular commercial backup tools like NORTON GHOST but NOT XFS...(or other e-X-otic :-D filesystems) b. the restore would use as a target, a larger capacity disk than the source and the procedure should be able to cope with this (if your hard disk fails it is highly unlikely that you will be able to find a disk of the exact same size, but since disks grow bigger and bigger it is plausible that you will be able to find a bigger one...) c. bare-metal-restore from zero to working system and as simple as possible for n(.)(.)bs ================================================== ========================== Specifics: I have tested the procedure I describe, going from an 80GB disk (system partition ~20GB (XFS) + user partition ~50GB (XFS) + swap) to a 320GB hard disk The system described is Athlon64 based, on a NVidia NF4 based mobo with an NVidia graphics card (have NOT tested with other hardware and hence cannot guarantee that everything will go as smooth...) The machine is supposed to have two different optical drives. The one I have has 1xCD-RW + 1xDVD-ROM ================================================== ========================== Needed material: A. The new target disk B. A Clonezilla LiveCD that you can download and burn from here: [http://clonezilla.sourceforge.net/]. I used version [clonezilla-live-20070205] C. A GParted LiveCD that you can download and burn from here: [http://gparted.sourceforge.net/livecd.php]. I used version 0.3.4 D. The blank CDs needed above and one blank DVD-R E. Some form of large capacity removable storage. I have used a common USB2.0 mounted 3.5" hard disk. It was purchased (not for this purpose alone...) as a common 3.5 hard disk, an external USB2.0 disk enclosure and it was partitioned and formatted in FAT32 for maximum cross-compatibility F. The machine is supposed to have two different optical drives. The one I have has 1xCD-RW + 1xDVD-ROM ================================================== ========================== Steps: Backup 1. Plug the USB2.0 disk in your system. 2. Use the Clonezilla LiveCD to boot your system. Once the initial GUI appears run with the default Clonezilla Live option (with frame buffer). Choose language and continue with the boot-up procedure until it finally reaches the command line prompt in text mode 3. Become root, issuing "sudo su -" 4. Having figured out how the two disks (the internal source disk to be backed-up and the external USB2.0 disk that will store the image for now...) are recognized (you can get a hint during the probing phase of the boot-up procedure...) you must mount the USB2.0 disk. To give an example, my source disk was /dev/hda and the USB2.0 disk partition can be /dev/hdb1 or maybe /dev/sdb1 (or 2, or 3....depending on the partition structure of the disk...). The mounting point MUST BE (BE VERY CAREFUL HERE) "/home/partimag". So, for example, if the image is to be stored in /dev/hdb1 you must issue "mount -t auto /dev/hdb1 /home/partimag". 5. Start the backup program by issuing "ocs-sr -x" 6. Choose language and "savedisk" to save the entire source disk (all partitions and disk info...) 7. VERY IMPORTANT!!! In the options that follow UNCHECK the one marked "-q Use ntfsclone to save NTFS partition instead of partimage". This option is enabled by default but is suitable only for NTFS filesystems!!!! 8. Choose compression type. I chose bzip2 that produces the smallest image. About 10GB in my system partition + 1.8GB in the user partition ended up fitting in a total of 4GB space (hence in a DVD-R) 9. Define the source disk when prompted, the image name and proceed to backup the source disk... 10. After completing the backup, the disk image that consists of various files in a single directory (that bears the name you chose...) was burned on a single DVD-R (you can use K3b, NERO or whatever...). If the image is bigger than the possible capacity of one DVD (say 8.5GB if you use DL media) you can use another application to span it across many optical disks for storage. BE AWARE THOUGH that (at least for the current version of Clonezilla...) IT IS NOT POSSIBLE TO RESTORE FROM SPANNED MEDIA!!! Hence if you DO span you must first rejoin the spanned pieces on - say - the USB2.0 external disk and then restore using the reverse procedure... 11. Backup is complete and the entire image is contained in one DVD-R... Restore 1. According to the configuration described above (see F in needed material...), I will use the Clonezilla LiveCD to boot from the CD-RW. Proceed to boot your system. Once the initial GUI appears run with the default Clonezilla Live option (with frame buffer). Choose language and continue with the boot-up procedure until it finally reaches the command line prompt in text mode. 2. Become root, issuing "sudo su -" 3. Place the backup image DVD in the DVD-ROM and mount it by isssuing (...modify as needed by your configuration) "mount -t auto /dev/hdd /home/partimag". It is also possible to use - instead of the DVD - the USB2.0 hard disk (e.g. if the image cannot fit in one DVD...). In this case you can issue the command (as in the step 4 of backup above...) "mount -t auto /dev/hdb1 /home/partimag". 5. Start the backup program by issuing "ocs-sr -x" 6. Choose language and "restoredisk" to restore the entire source disk (all partitions and disk info...) 7. VERY IMPORTANT!!! In the options that follow UNCHECK the one marked "-g auto Client will reinstall grub in its HD MBR". This option is enabled by default and IT WILL SCREW-UP THE MBR, RENDERING THE RESTORED SYSTEM PARTITION UNBOOTABLE. DO NOT DISREGARD THIS, THINKING IT WOULD BE POSSIBLE TO REPAIR THE BOOTLOADER INSTALLATION FROM YAST!!!! IT WILL NOT WORK!!!! JUST UNCHECK IT!!! 8. Choose the image directory name (if properly mounted in step 3, the program will be able to "see" the image) and the target disk (possibly /dev/hda...) and proceed to restore 9. If all went well in step 8, after rebooting it will be possible to normally start openSUSE having a mirror of the partitions that resided in the original source disk. Now if the new target has different (bigger) size proceed to step... 10. Boot from the GParted LiveCD. If everything is OK in the partition editor window you will be able to see your partitions and a lot of unallocated space at the end of the drive. What needs to be done now is move/resize the partitions to reach the final needed setup. It is a very straightforward task through the GUI. I find it better to proceed in steps, so for me, step 1 was to move the user partition (in the partition editor the 3 partitions swap,system,user appeared contigious and in that order...) deep in the desired point of the unallocated space and check (by rebooting openSUSE...), step 2 was to grow (resize) the user partition to the end of the drive and check again and - finally - step 3 was to grow the system partition until all the unallocated space is used-up. At this point - if everything has gone as planned - you have after rebooting, a ready working openSUSE system... Best of Luck ================================================== ========================================== P.S. Maybe that should better fit in the WIKI. Sorry for the mishap. If mods approve maybe they can assist in migrating this... Tks |
|
|||
|
Hi John.
Great howto! I'd been looking for something like this for ages. Finally went for Acronis 10 which does support Linux file systems. In fact the latest Norton Ghost 10.0 also had linux support though only ex2/3 and swap. /Geoff OT your username is my brothers name
|
|
|||
I haven't found anything similar also and that was the reason for searching things deeper... Glad to be of help. Most commercial packages support ReiserFS and ext2/ext3. The problem is that they do not support other file systems or that have only generic support through sector-by-sector copy that naturally produces HUGE images. Clonezilla was the first one to come across that supports nearly all major Linux file systems AND stores only data-occupied sectors (ergo small images...). If the Clonezilla team manages, in a future release, to include GParted or a similar easy-to-use tool and spanned media support, this will really be an excellent all-in-one backup/restore tool. But even with things as they are it is a lifesaver... ================================================== ================================================== =============================== A couple more comments for all the friends interested in this: 1. I guess there are also other open-source tools out there with similar functionality. For example the SystemRescue LiveCD I think (not 100% sure) includes both GParted and Partimage. I have not checked them out, hence I don't know if they support all filesystems with minimal user intervention (without the user having to load manually special kernel modules to be exact...). I would welcome ANY feedback on similar processes yielding the same result... 2. I guess, if the image file size permits, it would be possible to have a GParted LiveDVD containing also the backup image. This way one could reduce the needed media to carry around to just two: Clonezila + GParted/Image. It is not possible though (with current version of Clonezilla) to have a Clonezilla/image disk because after boot-up the Clonezilla LiveCD is already mounted on a point different than "home/partimag". If I got it right there ARE some plans in the Clonezilla team to have this capability in the near future, i.e. the backup image to reside ON the Clonezilla LiveCD... 3. I was going through today the PartImage Wiki. It is not clear to me how to backup an entire disk (not just partition by partition...). If it is available, feedback on this is highly welcomed... 4. Unnecessary to stress that unlike GHOST, ACRONIS, etc, both GParted and Clonezilla are open-source tools... 5. When the time comes to update openSUSE to the next version, having an image at hand is a real confidence-builder... 6. Obviously above process applies for cloning many identical machines, without the GParted bit... 7. It can be considered as an asset the fact that the user does not have to install anything on the source disk |
|
|||
|
In case someone is wondering how long the whole procedure took: about 30 minutes to backup and about the same to restore. The longest time was for GParted to move the partition in unpartitioned space, about 90 minutes...
I will continue to keep an eye on Clonezilla, as it is very possible that future versions will have significant improvements. There is a clear interest for a LiveCD that would incorporate both tools Clonezilla + GParted. Additionally if they can support media spanning and direct CD/DVD image burning (w/o an external app...) with an improved GUI on the "user-friendly" side, this LiveCD would be industrial-strength and cross-platform stuff. AND open-source too... |
|
|||
|
As a special note to a well-known, easily recognizable, cute-eyed, Mac-loving openSUSE user (and a hint of agent-provocateur-ish...)
that is interested in massive machine cloning, from what I understand, Clonezilla has also a bigger brother, more adept as a proper backup server that supports ultra-massive cloning through uni-casting or multi-casting. But naturally all this is far beyond the scope of a N(.)(.)b openSUSE single-machine backup...Greets |
|
|||
|
I found this polite note from Steven Shiau of the Clonezilla team in my mailbox today:
======================== QUOTE =============================== Hi John: About gparted and clonezilla, actually we made another live CD recently,it's called DRBL live. This is the server edition for DRBL. It includes all the DRBL functions and Clonezilla functions. Therefore you can use that to replace Clonezilla live. The best thing is, gparted is also included. Therefore you can use it to clone and resize partitions. Now it's in the early beta status, if you have a chance, please have a try. For the short note, check this: http://opensource.nchc.org.tw/drbl-live/te...l-live-note.txt The programs are here: http://opensource.nchc.org.tw/drbl-live/testing/ If you want to use gparted, you can not use drbl-live-standard one, since it's only text mode. Use others. Enjoy. Regards, Steven. =================== UNQUOTE =============================== It seems there is a good progress in merging the tools together. If I manage to scrounge some time and test this I will post the results... P.S.: This LiveCD - since it uses DRBL, Clonezilla's bigger brother - should be suitable for massive cloning as well... |
|
|||
|
Concerning my last post, DRBL-LiveCD is only a beta test version and the GParted version that is embedded is 0.2.5 (...current GParted LiveCD uses 0.3.x...) which is very buggy, does not support XFS, JFS, etc... and has known issues with NTFS as well...
The respective DRBL/Clonezilla & GParted devels are currently cooperating to bring the tools up-to-date. So until bugs are fixed, I would suggest sticking with separate LiveCDs as per my original post (either {Clonezilla LiveCD + GParted LiveCD} or {DRBL-LiveCD + GParted LiveCD})!!! I have to add though, that the DRBL-LiveCD looks very promising all-in-all (adding embedded X frontends to the backup/restore apps will make it a "killer" professional tool...) and probably can even be used as a system rescue CD with the inclusion of some additional tools...
|
|
|||
(...faaaast moving devels....)A new DRBL-LiveCD is out....with embedded GParted 0.3.3... Testers are welcomed to give it a try...and provide some feedback... (I definitely will at some point...I must first secure needed resources, spare disks etc... DRBL / Clonezilla I expect to work w/o any issues, the GParted-bit is the first one that will need verification...) |
|
|||
|
Did a check on DRBL-Live with embedded GParted 0.3.3 and it works just fine!!! It seems this is now as good a solution as the {Clonezilla-LiveCD + GParted-LiveCD} pair. I did not take a fresh backup (...but I am guessing, that there would not be any problems with that...). I checked mounting of removable media (flash disks and external USB2.0 HDs...). The bare-metal-restore process I verified, breaking at a crisp 22' for the restore of my two 10.7GiB+1.8GiB XFS partitions + swap with an additional 44' for GParted to resize them to proper size (up to an hour with all the intermediate checks...). About 90' in total from nothing (like a dreaded disk loss) to full running system...(...or under 30' without resizing...)
My final comments to sum things up: > This version of GParted seems to work much faster, so this is one more plus for this little tool. > The root pass. is "drbllive" but GParted can be started anyway from the terminal by issuing "gksudo GParted" > Other instructions are identical as per my original post... > The XFCE version fits nicely on a little 8cm disk > This is a GREAT base for a future full-blown rescue CD... Greets P.S. : News are coming at a very fast rate. Apparently it is so obvious how attractive the combination of these tools is, that there is a parallel integration approach from the GParted team this time: LarryT announced a combined Clonezilla - GParted LiveCD, where the user simply chooses through GRUB at boot-up which tool to load...This ISO is about 130MB in size... |
|
|||
|
Realizing that this thread can be of good use for just about any distro (and probably any OS as well...), a concatenated version is now a backup/restore tutorial, here:
http://www.linuxquestions.org/linux/answer...ur_Installation Greets |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|