Arch Linux - "trimming the fat" for a backup
Sunday, March 1, 2009 3:35:12 AM
So today I decided I'd like to do a system-wide backup (all important files).
Why?
Well, it's always better to have a one or two gig backup file stored somewhere just in case something goes wrong...
So before I do my backups I like to have a look at how much space one will take up.
Using bzip as my compression and tar as the main archiver, I usually can achive a compression rate of 1/2 the original size. Meaning, that if my system is roughly 8 gigs, a backup should be roughly 4 gigs.
Well, when I opened up the disk usage analyzer, it showed almost 18 gigs in use. Eight of those were completed torrents in my downloads folder, (Vmware, and OS X) and the rest was being used by the system (approximately 10 gigs of space). That's way too much. A 5 gig backup will never fit on a dvd, especially not when you include the fact that I'm going to put on a minimal Arch LiveCD as well, so I can just pop in the cd, reformat the disk, and unarchive my file, then with minimal editing to the fstab file, I'll have my system working again. (My friend was sitting next to me, watching) He asked me a very simple question "If your DVD is only 4.7 gigs, and your backup is going to be 5 gigs, and you have more stuff to put on the dvd other than just the backup, how do you do it?"
In reality, a DVD isn't really 4.7 gigs. It's actually closer to 4.4 gigs... (4698656768 bytes) you can calculate that out if you'd like... divide by 1024 to get kbytes, and again to get mbytes, and one last time to get gbytes. I'm not too fond of doing math though, so I avoid it whenever possible.
After his question I gave a rather bland response "You trim the fat." He had a bit of a puzzled look on his face, at which point I explained that your Operating System, and your entire computer for that matter does not actually have fat, like animals, but that they do contain "bloat" software you don't use, libs that are never accessed, backup files made by programs like gedit, etc. I told him that in order to fit the backup onto a single DVD, including an environment from which I can extract it, I needed to remove things that are not used, or not needed.
So I set out...
In another post, I'll be writing about what exactly was trimmed and how much space was saved
Why?
Well, it's always better to have a one or two gig backup file stored somewhere just in case something goes wrong...
So before I do my backups I like to have a look at how much space one will take up.
Using bzip as my compression and tar as the main archiver, I usually can achive a compression rate of 1/2 the original size. Meaning, that if my system is roughly 8 gigs, a backup should be roughly 4 gigs.
Well, when I opened up the disk usage analyzer, it showed almost 18 gigs in use. Eight of those were completed torrents in my downloads folder, (Vmware, and OS X) and the rest was being used by the system (approximately 10 gigs of space). That's way too much. A 5 gig backup will never fit on a dvd, especially not when you include the fact that I'm going to put on a minimal Arch LiveCD as well, so I can just pop in the cd, reformat the disk, and unarchive my file, then with minimal editing to the fstab file, I'll have my system working again. (My friend was sitting next to me, watching) He asked me a very simple question "If your DVD is only 4.7 gigs, and your backup is going to be 5 gigs, and you have more stuff to put on the dvd other than just the backup, how do you do it?"
In reality, a DVD isn't really 4.7 gigs. It's actually closer to 4.4 gigs... (4698656768 bytes) you can calculate that out if you'd like... divide by 1024 to get kbytes, and again to get mbytes, and one last time to get gbytes. I'm not too fond of doing math though, so I avoid it whenever possible.
After his question I gave a rather bland response "You trim the fat." He had a bit of a puzzled look on his face, at which point I explained that your Operating System, and your entire computer for that matter does not actually have fat, like animals, but that they do contain "bloat" software you don't use, libs that are never accessed, backup files made by programs like gedit, etc. I told him that in order to fit the backup onto a single DVD, including an environment from which I can extract it, I needed to remove things that are not used, or not needed.
So I set out...
In another post, I'll be writing about what exactly was trimmed and how much space was saved














