I sometimes do a quick image backup over the network after booting from a livecd. Compressing it on the host running dd keeps the network traffic down.
dd if=/dev/hda | bzip2 -c | ssh foosystem "/bin/cat > /backup/diskimg.bz2" On Thu, Apr 16, 2009 at 12:15 PM, Word Wizard <[email protected]>wrote: > Another path to the goal > > I did some more research about the 'dd' command (yes I am a newbie) and > that tool doesn't have tar's weakness in this area. Copying the entire > partition takes up ten times more space than just tar-ing the individuals > files but it is faster than my preferred bzip2 compression format. Once I > starting studying disk partitions I realized that it was better to install > the / file system on one partition and /home on a separate partition. That > way I could dd my / partition and tar my /home. The default Ubuntu > installation model places / and /home on the same partition so it took me > some time and research to realize that manually designating separate > partitions for different parts of the file system was more useful. > > Before using dd on /, I boot up with and run in the installation DVD Gnome > environment. That way I can access / as a dismounted partition without > worrying about file changes during a backup. > > When done, I mount my /home partition as /media/disk-1 and tar that > one.The datablock location problem you pointed out does not seem to be an > issue with my /home partition. As it isn't the active /home partition for > that live/installation environment, I assume there will be minimal/no file > changes while it's being tar-ed. Just to be sure I created one dd /home > partition backup to use in case I've missed something. I'm sure I have and I > trust someone will point it out. > > With Windows I never needed to know anything about partitioning after the > installation partition selection choice. With Linux it appears I won't get > very far without an in-depth knowledge of disk geography and the Linux tools > used to work with storage media. The upside is that once I learn the tools I > can do things in different ways specific to a given need. I prefer having > more tools even though it can be frustrating to want to do something I know > other Linux users can do but I can't do because I haven't learned enough > about the process. > > > Thanks again for the help & information. Linux is becoming more fun and > less a pain as I learn more. > > > Word Wizard > > On Wed, 2009-04-15 at 19:59 -0700, Dwight Hubbard wrote: > > Grub stores the actual physical locations of the datablocks of it's stage > 1.5 or stage 2 files in the bootblock. If you restore from a tar archive > the location of the blocks for the grub stage files will almost certainly be > different and as a result grub will generate an error 15 because it can't > find them. > > After restoring from a tar archive you need to chroot into the newly > restored filesystem and run a grub-install to cause the restored system to > write the grub stage file locations to the boot block. > > Or you can restore grub from the grub command. If my memory serves the > commands would look something like this (assuming your /boot filesystem > (hd0,1) and you want the boot block on the first hard disk: > root (hd0,1) > setup (hd0) > > On Thu, Apr 9, 2009 at 6:13 PM, Word Wizard <[email protected]> > wrote: > > > One of the reasons I adopted Linux (Ubuntu Intrepid) was that, unlike > Windows, it SUPPOSEDLY allowed one to fully back up the entire system, > system files and all, and restore them. So if you installed files or > configured your system and made mistakes, you revert to a previous > system. That's the theory. The reality is a bitter disappointment. > > I sudo su, change to / directory and use the following command and > generate a valid tar backup: > > tar cvpjf /home/username/BackUp/Archives/total_backup.tar.bz2 > --exclude="/home//username/HD_1" --exclude="/home//username/HD_2" > --exclude="/home//username/.thumbnails" > --exclude="/home//username/.mozilla/default/Cache" --exclude="/proc" > --exclude="/lost+found" --exclude="/media" --exclude="/mnt" > --exclude="/sys" / > > To restore, I sudo su, change to the / directory and use the following > command: > > tar xvpjf /home/username/BackUp/Archives/total_backup.tar.bz2 -C / > > First problem. Upon reboot I get an "error 15" Can't find the grub > files. They are there but It seems the problem may be with using UUIDs > instead of (hd0) notation. The UUIDs change. What no-life propeller head > chose to use UUIDs anyway? > > It gets worse. I tried booting from the distro DVD (Intrepid) and > using grub to 'find /boot/grub/stage1'. > > grub finds it (hd0,5). That's the correct location. I use the sudo su, > then the root (hd0,5) command. No error messages. I use the setup (hd0) > command and the output says it found the /boot/grub/stage1 file and is > writing (hd0)/boot/grub/menu/.lst. > > BUT... It does not write (hd0)/boot/grub/menu/.lst. Anywhere. I check > the root drive and the old /boot/grub/menu/.lst is still there. Even if > I rename it, no new menu.lst appears . > > > What am I doing wrong? Or is Linux still not ready for prime time and > only for hackers? > > > > > > _______________________________________________ > PLUG mailing list > [email protected] > http://lists.pdxlinux.org/mailman/listinfo/plug > > > > > -- > Dwight Hubbard > Owner Effective Automation Solutions > Website: http://effectiveautomationsolutions.com > Blog: http://computing.dwighthubbard.info > Email: [email protected] > Phone: (503) 616-4493 > Redhat Certified Engineer - RHCE #804007137224095 > VMware Certified Professional - VCP #18529 > > -- Dwight Hubbard Owner Effective Automation Solutions Website: http://effectiveautomationsolutions.com Blog: http://computing.dwighthubbard.info Email: [email protected] Phone: (503) 616-4493 Redhat Certified Engineer - RHCE #804007137224095 VMware Certified Professional - VCP #18529 _______________________________________________ PLUG mailing list [email protected] http://lists.pdxlinux.org/mailman/listinfo/plug
