[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: backup/restore




On Feb 15, 2007, at 4:28 PM, Casey T. Deccio wrote:

I'm looking for a solution to temporarily backup then restore a Debian
install--preserving the filesystem contents and attributes. The caveat
is that the capacity of the drive I'll be restoring to is smaller (all
other hardare is unchanged).  I wasn't sure if there was a way to do
this with dd because of the smaller drive on the restore. Initially, I
used 'rsync -avH --delete --no-numeric-ids src server:dst' to send
everything to another server and back.  The number of files (including
links, etc.) seemed to check out, but disk usage (using 'du -cs /') was different before and after (block size on the filesystem was the same as
before).

I've seen that too. Two things that seem to cause it are directories and symlinks.

Directories can be different sizes in src and dst even though their contents are the same. One possible explanation is that a directory built up piece-at-a-time will have a different structure from the same directory built up all-at-once.

Identical Symlinks can be hard linked together in the src but will be individual files in the dst. That results in more inodes and (trivially) more space being used in dst.

Neither effects are serious. If you are really concerned, you can use 'find . -type f -exec md5sum "{}" \;' to verify the text files were copied correctly. That's crude but effective. More sophisticated 'find' commands are possible for more sophisticated checks. read the man page for details.


Plus I was not sure if extended attributes were transfered
with the files.

Anyone know if the extended attributes are transferred with rsync or why
the disk usage is not the same?  Any suggestions on a better way to do
this?  I'd like to avoid re-installing and reconfiguring again.

Don't know about that.

Rick



Reply to: