Re: backup



On 19 Set, 16:10, Douglas Mayne <d...@xxxxxxxxxxxxxxxxxx> wrote:
On Fri, 19 Sep 2008 13:50:39 +0000, r wrote:
On 2008-09-19, Douglas Mayne <d...@xxxxxxxxxxxxxxxxxx> wrote:

You gave me a good tip about doing disks images and restore them via
live cd.
But, just one question. My root ( / ) is 60 GB, just 6/7 GB are used.
If I make a disk image
( for example 'dd if=/dev/sda2 of=/mnt/disco_d/backup_image' )
how much it will be the size ? ( 60 GB or 6/7 GB )

All things being equal, an image made that way will consume 60G. There is
one trick* which can make the image as compressible as possible, though.
You could create a large file filled with zeroes which uses almost all of
the space in advance. Then when it is backed up, that zeroed space will
be easily compressible:

# dd if=/dev/sda2 | gzip >/mnt/disco_d/sda2.img.gz

Other tools are required to avoid zeroing space to minimize the backup to
the space in use. That is one of the reasons that "one size does not fit
all," and that other tools exist which have more finesse than dd. As tools
go, dd is a sledgehammer; tar is a framing hammer. The other tools I
previously mentioned work better to capture the disk space actually in
use. Extra care must be taken with the tools you choose because the image
may not be complete, for whatever reason. For example, tar doesn't
capture extended file attributes and file acls. These can be backed
up separately, though, and saved along with the backup. (getfacl,
getfattr). Depending on which filesystem you are using, there can be
specialized backup tools; for example, xfs has xfsdump. But for
simplicity, I often stick with simple tar/gzip backups. The other
thing which is not captured with this method is the bootloader specifics.
That must be fixed up separately at restore.

This is probably why on my first/last complete system backup with tar
( tar czf )
at restore I had an unusable system ( I had to reinstall ). So I would
avoid using tar.
My filesystem is reiserfs, I found reiserfsdump now looking around.
What about rsync, Do you know it ? can it create backup files
compressed
to be restored correctly ?
Is the way of create partition image a safe way ?







* May not work in advanced filesystems which see you are writing zero and
create it "sparsely."

--
Douglas Mayne

.



Relevant Pages

  • tar vs dpkg --get-selections for backup scheme
    ... past with various backup programs like mondo to name one, ... Not sure how you can fit several tar to one cd but maybe one can use ... To restore, you would have to boot with a rescue cd like Knoppix, ... Install a base system, set the package selections with dpkg ...
    (Debian-User)
  • RE: problem with restore
    ... If you take backup and try restore using tar, ... Note:- Make sure that you have rewinded the tape before trying to ...
    (RedHat)
  • Re: this is not a specific linux question but more of just UNIX - tar, dump, restore command questio
    ... G>>>> how to do a restore from a tar file assuming they are using tar. ... G>>>> rrestore if dump was used? ... G>>> tar is pretty simple to do a backup and restore. ...
    (comp.os.linux.misc)
  • Re: Linux Backup Administration
    ... Gnutar and star provide extensions to the original tar (which did ... > relative pros and cons of cpio style vs. tar style backup? ... goal is to be able to restore an exactly identical system as fast ... The most likely reason to need the backup is that someone accidentally ...
    (Fedora)
  • Re: Two "expert" issues I must solve before upgading
    ... When I said "If a few apps have to be re-installed after the restore ... still sounds like the 'disk image' approach is more religious than by ... either make every backup physical, ...
    (microsoft.public.windowsxp.newusers)