rsync deleted everything else on my usb drive
ran rsync -a --delete photos/ /mnt/usb/ and now only the photos are there. other folders gone. why?? can i get it back
Your discussion
This browser holds the management token for this post.
Save management token
Keep this private. Anyone with the token can resolve or delete this discussion.
4 replies
Because you told it to make /mnt/usb an exact copy of photos/. --delete removes everything in the destination that isn't in the source. You want /mnt/usb/photos/ as the destination.
Getting it back: unmount it now and stop writing to it. photorec or testdisk can often find the files if nothing has overwritten them.
-n first. Always. With --delete, every time.
got most of it back with photorec, filenames are gone though. using -n from now on. dont say anything lintroller
I said nothing.