Help with excluding .Trashes in an rsync backup


 
Thread Tools Search this Thread
Special Forums UNIX Desktop Questions & Answers Help with excluding .Trashes in an rsync backup
# 1  
Old 07-31-2011
Help with excluding .Trashes in an rsync backup

I'm using this script to backup an external hdd to another external hdd -
Code:
rsync -aE --delete --exclude Volumes/Disk\ A/.Trashes "/Volumes/Disk A" "/Volumes/Disk A Backup"

The source drive being "Disk A", and the drive I wish to backup to being "Disk A Backup".

I'm constantly getting this error, despite trying multiple variations of the exclude part of the command -
Code:
rsync: opendir "/Volumes/Disk A/.Trashes" failed: Permission denied (13)

Also, I don't know if this is related but the command will copy any new files over, but won't delete folders/files on the backup drive that have been removed from the source.

Any help would be much appreciated!
# 2  
Old 08-01-2011
Where is .Trashes, actually?
# 3  
Old 08-01-2011
It's a hidden folder, in the root directory of Disk A. So I guess its path would be "/Volumes/Disk A/.Trashes"... Forgive my horribly basic understanding of unix!
# 4  
Old 08-01-2011
Hidden entry names start with '.', so maybe "/.Volumes/Disk A/.Trashes" ?

The error makes it sound more like a permission problem.

Send an 'ls -lLd "/Volumes/Disk A/.Trashes" '.
# 5  
Old 08-02-2011
Code:
--exclude Volumes/Disk\ A/.Trashes

You have excluded the .Trashes directory but not any of the content that it contains. When a user puts a file or directory in the Trash from a mounted rw device the file or directory is moved to the .Trashes directory on that device. The OS creates a directory within .Trashes named with the user's uid with the content to be trashed. So, either create mutiple PATTERNS or unlink everthing inside the .Trashes directory before runnning rsync.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Backup solution using rsync

Hello All, I am looking at a fast way to script some backups. I am looking at using rsync to do the leg work. I am having a hard time conceiving a script though. I have a tree with subfolders within subfolders. I was looking at the /xd option to parse the tree. Directory of k:\ ... (4 Replies)
Discussion started by: jvamos
4 Replies

2. AIX

Excluding directory in my tar Backup

Hello AIX experts. Hope this topic finds you well :) Now, I will take a backup for a directory called medcbs. Inside this directory 1 subdirectory I don't want to include it in the backup. So, how to exclude it? To be more clear, take a look to the following: /bossapp1/medcbs>... (4 Replies)
Discussion started by: Mohannad
4 Replies

3. Shell Programming and Scripting

Rsync better use for backup

Hello, I have a list of working directory in a remote computer acesssible through ssh and the same directory structure in my home directory of my laptop. I sometimes work on both my laptop and my this other computer. I usually use Rsync this way to synchronize files rsync... (5 Replies)
Discussion started by: ajayram
5 Replies

4. Shell Programming and Scripting

Rsync script and backup problems.

Hello everybody I'm triing since few days to do this. So sorry if my question looks stupide, but i've tried. I have to get picture from a folder (who is updated automaticly and with subfolder) with theirs extensions (i'm ok on that) and this files have to me copied in a folder where a website... (7 Replies)
Discussion started by: boytruc
7 Replies

5. Shell Programming and Scripting

rsync backup mode(--backup) Are there any options to remove backup folders on successful deployment?

Hi Everyone, we are running rsync with --backup mode, Are there any rsync options to remove backup folders on successful deployment? Thanks in adv. (0 Replies)
Discussion started by: MVEERA
0 Replies

6. Shell Programming and Scripting

rsync backup and recovery options

Hi, Do we have any options in rsync to recover files from the backup? Please share your thoughts. Thanks in advance. (0 Replies)
Discussion started by: MVEERA
0 Replies

7. Shell Programming and Scripting

Rsync backup

How do i use Rsync yo pickup only new or modified files from source? I am using rsync -ravzpotu --delete-excluded but sometimes it goes thru all files again (5 Replies)
Discussion started by: sprool
5 Replies

8. Shell Programming and Scripting

rsync script for synchronisation and backup

hello, i need to modified my synch/back scripts.... i want that this script only syncro folders in destinationfolder. f.e. when in destination are two folders 1) admin 2) users but in SOURCE are three: 1) admin 2) users 3) antivirus the script should only increnmential sync the... (0 Replies)
Discussion started by: onkeldave
0 Replies

9. Shell Programming and Scripting

Rotating snapshot backup using rsync

I want to take daily backup(11pm) of /var/www to /mnt/bak excluding /var/www/videos and /var/www/old. HOW to implement a rotating snapshot method, so that i can have multiple(say 4) automatically rotating backups. (0 Replies)
Discussion started by: proactiveaditya
0 Replies

10. UNIX Desktop Questions & Answers

tar backup with excluding some folders

Hi , I want to backup the root file system but the size of / is very huge so I want to exclude some file systems.Man page of tar says X option excludes files but I could not do that.I use this command $ tar -cvf deneme.tar -X exc . $ cat exc sql kkm I think there... (2 Replies)
Discussion started by: kudret_gulcan
2 Replies
Login or Register to Ask a Question