LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-10-2011, 01:02 AM   #1
changcheh
Member
 
Registered: Nov 2003
Location: china
Distribution: Linux Mint
Posts: 49

Rep: Reputation: 15
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?
 
Old 09-10-2011, 09:44 PM   #2
changcheh
Member
 
Registered: Nov 2003
Location: china
Distribution: Linux Mint
Posts: 49

Original Poster
Rep: Reputation: 15
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/
 
  


Reply

Tags
cryptsetup, encryption, luks, rsync


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Encrypted partitions (LUKS) or loopback files (cryptmount)? lucmove Linux - Software 0 04-11-2011 04:34 AM
Cannot write to LUKS encrypted hard drive Nemesissparadise Linux - Software 3 04-04-2011 04:02 PM
Loaded Fedora 9 (twice) in encrypted hard drive, now I can't get past LUKS? GaveUpOnTV Linux - Newbie 3 05-04-2009 02:48 PM
Mounting LUKS encrypted drive from a failed pc: LVM2 error klearview Linux - Software 1 10-31-2008 03:34 AM
Copying whole changed files - rsync? deadlock Linux - Software 2 12-04-2007 04:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration