LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   rsync copying everything not only changed files with luks encrypted drive (https://www.linuxquestions.org/questions/linux-general-1/rsync-copying-everything-not-only-changed-files-with-luks-encrypted-drive-902238/)

changcheh 09-10-2011 01:02 AM

rsync copying everything not only changed files with luks encrypted drive
 
I have an encrypted LUKS external drive that I use to backup. I did my first backup on it a week ago (just a straight copy from nautilus, not rsync), and now when I plug it in, it asks for the password and mounts automatically by udisk ID. However, the directories and files on it are only accessible by root.

Extract from mount command:
Code:

/dev/mapper/udisks-luks-uuid-3d0c187c-fcfd-462c-95a1-f926836a7623-uid1000  on  /media/66786f83-3a01-49e9-a232-43f03331fa14  type  ext4                  (rw,nosuid,nodev,uhelper=udisks)
When I try to sync the new files to it, it tries to recopy every file! I have tried many options, including the ones I used to successfully use before encrypting the drive:
Code:

## PREVIOUSLY WORKED
sudo rsync -ar --progress --delete --stats /media/files/Movies/ /media/66786f83-3a01-49e9-a232-43f03331fa14/Movies/

## TRIED BECAUSE --inplace DOESN'T COPY EXISTING FILES
sudo rsync -ar --progress --delete-after --stats --inplace /media/files/Movies/ /media/66786f83-3a01-49e9-a232-43f03331fa14/Movies/

## TRIED BECAUSE I FIGURED IT WAS A PERMISSION PROBLEM AND -a = -rlptgoD, WHERE g=GROUP, o=OWNER, p=PERMISSIONS, --no-perms=SPECIFICALLY TURN OFF PERMISSIONS
sudo rsync -rltD --progress --delete --stats --no-whole-file --no-perms /media/files/Movies/ /
sudo rsync -rltD --progress --delete --stats /media/files/Movies/ /media/66786f83-3a01-49e9-a232-43f03331fa14/Movies/

Any ideas anyone?

changcheh 09-10-2011 09:44 PM

rsync copying everything not only changed files with luks encrypted drive
 
After spending 2 days on this reading manpages and such, I decided that syncing with a filesize only option was best, because I don't need to preserve permissions and it's unlikely any changes I make to files, wouldn't also change their size.

I am using this process:
Code:

# open the encrypted drive for mounting
sudo cryptsetup luksOpen /dev/sdb1 320GB
# mount the drive on /media/enc
sudo mount -o rw,nosuid,nodev /dev/mapper/320GB /media/enc/
# rsync by filesize only
rsync -r --size-only --progress --delete --stats /media/files/Movies/ /media/enc/Movies/



All times are GMT -5. The time now is 02:44 PM.