You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's a simulated usecase using rsync to recover unique files from an old backup:
$ # make some files
$ mkdir originals && cd originals
$ for i in {1..200}; do dd if=/dev/urandom bs=1 count=${#i} of="file $i"; done
...
$ # make a backup
$ cd .. && cp -a originals backup
...
$ # make some changes (add some, change some, delete some)
$ cd originals
$ for i in {200..300}; do dd if=/dev/urandom bs=1 count=${#i} of="file $i"; done
$ for i in {99..110}; do dd if=/dev/urandom bs=1 count=${#i} of="file $i"; done
$ for i in {9..20}; do rm "file $i"; done
$ cd ..
...
$ # use rmlint to find unique files in the backup
$ rmlint -o uniques -k originals/ // backup/ | tee uniques.txt
...
$ # use rsync to archive the unique files
$ mkdir recovered
$ rsync -av --files-from=uniques.txt / recovered/
...
$ # did it work?
$ tree recovered/
...
$ # great, now we can wipe the backup drive
$ rm -rf backup
In response to http://askubuntu.com/questions/686763/how-do-i-view-non-matching-files-only-in-fdupes; working first attempt at https://github.com/SeeSpotRun/rmlint/tree/feature/uniques. Usage:
rmlint -o uniques ...
I think it could be quite handy, eg for recovering just the unique files from an old backup:
$ rmlint -o uniques -k ~ // /mnt/backup
Discussion welcome, including best way to copy the found files (short shell script I guess).
The text was updated successfully, but these errors were encountered: