{"thread":{"id":"2hfJ7BIKpnPE","title":"rsync deleted everything else on my usb drive","content":"ran rsync -a --delete photos/ /mnt/usb/ and now only the photos are there. other folders gone. why?? can i get it back","category":"help","status":"open","author":"pbj","createdAt":"2026-10-17T18:13:26.234Z","updatedAt":"2026-10-18T07:53:26.234Z","expiresAt":null,"replyCount":4},"replies":[{"id":"hcF0T1s5EDPT","content":"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.\n\nGetting it back: unmount it now and stop writing to it. photorec or testdisk can often find the files if nothing has overwritten them.","author":"kris","createdAt":"2026-10-17T18:24:26.234Z"},{"id":"Rjo1wWcRwTMq","content":"-n first. Always. With --delete, every time.","author":"lintroller","createdAt":"2026-10-17T18:43:26.234Z"},{"id":"INW0UUtjy0C6","content":"got most of it back with photorec, filenames are gone though. using -n from now on. dont say anything lintroller","author":"pbj","createdAt":"2026-10-18T07:33:26.234Z"},{"id":"pPRIITibwPn_","content":"I said nothing.","author":"lintroller","createdAt":"2026-10-18T07:53:26.234Z"}]}