[plug] Backup and partitions

Fabrício dos Anjos Silva fasilva at dpi.ufv.br
Wed May 16 11:16:17 WST 2001


    Hi all,

    I would like to know the best tool to backup my HD data, on both
ext2 and vfat filesystems (maybe NTFS too). tar is good, but can it
handle correctly device files in /dev or more complex details? I mean,
can I trust tar, so I can restore an exact running copy of my system?
And what about permissions and ownership?

    As a solution, I was wondering if I could copy the partition itself.
If I could do this, I would be able to have a exact copy of my system. I
would do this using:

# dd if=/dev/hda1 of=backup
or for my whole disk:
# dd if=/dev/hda of=backup

    One problem with this approach is that I can't do incremental
backups. Well, I tried this approach at home and it worked fine. My
doubt is: When I going to restore the partition data, does the new
partition must have the same size as the backup file? I'm asking this
because if I have to restore the data to a different HD, I will probably
have a partition with different size, since partitions must start on the
beginning of a cylinder and end on the end of another cylinder, and
different HD's have different cylinder sizes, right? I simulated this
with a floppy. I created a 720kB file and used mkfs.ext2 to create a
file system on it.

# dd if=/dev/zero of=floppy bs=1024 count=720
# mkfs.ext2 floppy

Then, I erased a floppy disk:

# dd if=/dev/zero of=/dev/fd0 bs=1024 count=1440

Then, I copied the file to the floppy disk:

# dd if=floppy of=/dev/fd0 bs=1024 count=720

    After all this, I could mount and use the floppy, even if it shows
just 720kB as total space. The rest of the disk was wasted. Would this
work for a real HD partition? And would it be safe to use the filesystem
in this state?

    If anything above is not correct, I would appreciate corrections. I
would also appreciate suggestions to the best backup tool.

    See you,

--

Fabrício dos Anjos Silva <fasilva at dpi.ufv.br>

Computer Science Undergraduate
Graduando em Ciência da Computação

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2016 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20010516/e9b79582/attachment.bin>


More information about the plug mailing list