Restore da Ubuntu a NAS
Su Ubuntu:
(1) sudo su
(2) apt-get install fuseext2
(3) apt-get install lvm2
(4) modprobe fuse
(5) vgscan
(6) vgchange -ay c
(7) fuseext2 -o ro -o sync_read /dev/c/c /mnt
e successivamente:
rsync --progress -avzh /mnt/brainstorm/ root@192.168.98.3:/c/brainstorm
oppure essendo il locale:
rsync --progress -avWh /mnt/brainstorm/ root@192.168.98.3:/c/brainstorm
Files check
Per verificare le eventuali differenze evitando qualunque modifica,
utilizzare le opzioni:
-c, --checksum: skip based on checksum, not mod-time & size
-n, --dry-run: perform a trial run with no changes made
Esempio:
rsync -rcnv //mnt/brainstorm/main/ root@192.168.98.3:/c/brainstorm/main/
Verifica dei files copiati alternativa ad rsync
find . -type f -print0 | sort -z | xargs -0 md5sum
If you want to use file sizes as a check on the operation of rsync
(not the best check, but it will catch some kinds of errors) you could
do something like this
( cd source ; find . -type f -print0 | sort -z | xargs ls -s ) > /tmp/
source-stuff
( cd target ; find . -type f -print0 | sort -z | xargs ls -s ) > /tmp/
target-stuff
diff /tmp/target-stuff /tmp/source-stuff
you can use something like "md5sum" in place of "ls -s" if you want a
more industrial strength check...