On 19 Set, 16:10, Douglas Mayne wrote:
> On Fri, 19 Sep 2008 13:50:39 +0000, r wrote:
>> On 2008-09-19, Douglas Mayne 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
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