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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I would like to backup my entire system using partimage, and I have a few questions as to how exactly I need to do this. First, how much will bz2 compress files? Is it practical to try to compress everything and get it on CDs? Also, I understand from what I've read that it will take a long time to compress... but how long approximately is "long"? If I have 10 gigs to compress, will this take an hour, five hours, twenty hours, etc.? Second, is it possible to backup and create bz2 files on the same partition that I'm backing up, or will it start to backup the backups that it has already written if I try to do this? Finally, I just wanted to confirm that if I back up every partition on my system using the above method (partimage) and save the partition table, that I should technically be able to completely mess up the system, reformat everything, and be able to get back to where I was when I backed up (or is there something else in here that I'm missing?). Thanks.
the time it takes depends on your hardware. You can see how good bzip2 is by compressing some largish files. Take a look at the man page for bzip2
you cannot backup onto a partition that you are trying to back up. You need a separate partition, drive or if you have more than one computer, you could do it over a network according to their documentation (I have never done it over a network).
The program can automatically break down the image files into files of a size that you specify, so Yes, it is feasible to back up onto CD-roms (it needs two steps, though; first onto the harddrive, and then burn the CDs).
And yes, you can mess up your system and get it back quite qiuckly. I have a smallish partition just for the purpose of running partimage and storing the image files before I do something major to my main install. That way, if I hose the system, I can get it back in about 15 minutes - it'll probably take longer doing from CDs. If you are worried about hardware crashes, you better save the backups to CDs or to some other harddrive.
Thanks for the info. I'm having a little trouble finding largish files (I just got rid of four nice ones... the Slack CD ISOs), but is it possible to get an idea of about how long it will take and how small of a bz2 file I'll be left with if I use partimage on a 10 gig partition (using a relatively recent computer), or is there no nice ballpark number for this?
you could just use bzip2 on a directory and see how long it takes and how small it gets. You have to make sure to keep the original (if you just do bzip2 filename, it will get rid of the original which is not good if it is an important directory).
bzip2 is a lot slower than gzip so you might consider using gzip compression. It doesn't get as small as bzip2 but it might still be acceptable. Also, partimage only compresses the data that is actually there so if you have a 10Gig partition but only 5G used, it will compress the 5G but not the rest.
Ok, I'll try it on a directory and see how it turns out. Should the percent compression there be about the same as it would be for a much larger file? Also, does the fact that partimage only compresses the data that exists affect restoring that partition in any way? When restoring those files and the partition table will it correctly replace the free space as well?
Distribution: Suse 9.2 but have used Suse 9.1 Red Hat 5.2 - 9, Linux Defender Live!, Knoppix, Morphix
Alternate backup program - Mondo Rescue
I know you are trying to backup with partimage but I have just recently come across a very good GPL'd backup and restore program call Mondo Rescue. It is very simple to use and offers the possibility of scripted or cron jobs for backup.
It is available from http://www.microwerks.net/~hugo/ unless you have SUSE 9.1 systems (I do) and you need to use some alternate packages from Mike Roark http://www.mikenjane.net/~mike/. This great little program runs from the command line and enables backup to CD-R, CD-RW, DVD (possible), Tape (works very well) and NFS. It creates a bootable CD and/or floppy that allows for a full system restore, directory or individual files.
Just offering another possibility if partimage gets too stressful :-)
re partimage and free space. Yes, it will recreate the partition exactly as it was including the location of the free spaces (I guess it does keep track of the free blocks somehow).
the compression rate will depend on what kinds of files you are dealing with. Plain text files compress a lot, but mp3 files don't because they are already 'compressed'.
BTW, Mondo is supposed to be pretty good as well. I do like partimage, tho. Has been doing what I want it to do. I even made restoration disks for my windows partition in NTFS, just in case I must get back windows on my computer (hope it never happens).
I actually looked quite a bit into Mondo and thought I'd try it out, but I downloaded the most recent version (from the TGZs directory on the "Mondo Install CD" link they give you on the site), and I got a whole bunch of compile errors just trying to install the program. I don't need to do scheduled backups (I'm fine with doing it manually), and partimage seems to essentially do the same thing if you're planning to burn to CDs (correct me if I'm wrong), so I thought I'd stick with that... I don't want a program I'm using to do backups to be giving me errors just trying to get it installed
Last question, I'm trying to figure out how I can backup all my partitions since I don't have a lot of free space hanging around. I have a 2 gig partition, so I think I'll save my main partition's backup to there and then use the main partition to save all the others. I was just curious what is going to happen if I run out of room on the partition that I'm saving to. Am I just going to get a nice error message letting me know and then I can find another way to do it, or is there a chance that would cause problems? I assume at this point that I'm not going to fill it up, but it's nice to cover all bases before jumping in and doing something like this. Thanks again.
Just some input that may be of use;
I use P/image on a Knoppix Live CD to do backups to a spare drive.
Speed wise; I have a AMD 1600XP running at 333MHz and 256MB RAM and using compression it runs at around 175MB/min. If you rate your own system around those specs you'll get some idea of how long it takes. I backup just the os (excluding my /home) which are straight forward files and they occupy around 4GB and the backup takes about 24 min.
Compression wise: the backup is roughly half the original. Bear in mind that there are no graphics etc that are already compressed.
As an aside I use rsync to backup my home partition on an hourly basis to the same spare drive.