Bash rsync but move not delete


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Bash rsync but move not delete
# 1  
Old 04-30-2008
Bash rsync but move not delete

There might be an easy solution to my problem, or maybe not, but here it is.

I am trying to rsync a Volume with 1.5 terabytes of data and send it via fibre channel to a raid array. Now normally when I rsync it scans through everything and, before copying anything, deletes any files that have been changed and will be copied over. Rather then doing this delete i would like it to move those files that have been changed to another location on the same drive. here is the script that i have:

Code:
rsync -avzr --exclude="*.DS_Store" --exclude="eBooks/" --exclude="archive/" --exclude="prints/" --delete /Volumes/image/$WORK /Volumes/XRAID/$WORK


I'd appreciate any help or suggestions.

Thanks

Last edited by rbatte1; 11-04-2016 at 01:21 PM..
# 2  
Old 04-30-2008
short suggestion: Maybe hard links can help you. Let a script create a directory hierachy identical to your data and populate it with hard links to the actual data. After an rsync run over one of those directories in the other the old data persist. (Can nicely be extended to use dirs representing one day each and giving you the ability to walk through exact old dirs without having to have all data on disk more than one time.)
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Rsync and Move files

I Have a requirement where i have to sync two directories one on source location server A and other on destination location server B as i do not have ssh access from server A----------->B I am doing rsync from server B, The Requirement is as follows Two directories on the source and... (4 Replies)
Discussion started by: James0806
4 Replies

2. UNIX for Beginners Questions & Answers

Move directory with rsync and delete from source

I need a rsync command which will exclude certain files and directories from source and copy the rest. I got this command working, sudo rsync -avzh --exclude 'bin' --exclude 'braintree' --exclude 'colinmollenhour' --exclude 'composer' --exclude 'doctrine' --exclude 'fabpot' --exclude... (2 Replies)
Discussion started by: Siddheshk
2 Replies

3. UNIX for Advanced & Expert Users

Rsync with --delete but do not delete peer dirs on target

rsync with --delete won't honor the delete if the source is something/*. I want the delete to work, but not to delete directories on the target that are peer to the intended directory. For example, using these source and target file structures: Source on desktop: ~/ Money/ ... (4 Replies)
Discussion started by: JavaMeister
4 Replies

4. Shell Programming and Scripting

Rsync move with symlinks

Hi, I use rsync to move from source to target, but there are cases that I need to exclude: Suppose in my file system, I have a soft link ~/data -> /media/volgrp/data. Under data folder, there is a file hello.txt. After moving command "rsync --remove-source-files -aH --force ~/data/... (3 Replies)
Discussion started by: huangyingw
3 Replies

5. Shell Programming and Scripting

Rsync with delete option

Hi, I have restored backup of a directory on one server to another server. But there may be some differences because the date on which backup was taken is 5 days back, so I want to delete the files on target if something is not in sync, but do not want to copy it all, since this is already... (1 Reply)
Discussion started by: solaris_1977
1 Replies

6. UNIX for Dummies Questions & Answers

Rsync Can I delete .NFS and .fuse files

Hello, I have some files in a local directory and perform an rsync command with the files in a remote directory, Now when I checked the files in the local and the remote directory, I found some strange filetypes such as this: .nfs0000000001d0c8e000002ff2 , .fuse_hidden000014da00000001 etc etc,... (3 Replies)
Discussion started by: ajayram
3 Replies

7. Fedora

rsync --delete

When I try to back up my libraries with rsync -azv --delete -e ssh /home/sarah/ saga:/home/sarah/bupembladaily/ I get error message rsync: readlink_stat("/home/sarah/.gvfs") failed: Permission denied (13) FATAL I/O ERROR: dying to avoid a --delete-during issue with a pre-3.0.7 receiver.... (7 Replies)
Discussion started by: sarahslagstedt
7 Replies

8. Shell Programming and Scripting

rsync question (regarding --delete)

Hi there Does anybody know of a way that i can, instead of issuing a --delete when syncing one directory to another, I can instead somehow receive a list of what would be deleted, but not actually delete it ? basically, people are occasionally putting files into one of synced folders, but... (2 Replies)
Discussion started by: rethink
2 Replies

9. UNIX for Dummies Questions & Answers

rsync with the --delete option

Tell me this - set me straight! The --delete option says "delete files that don't exist on the sending side" Does this mean and only mean that it will delete files from the DESTINATION that DON'T EXIST on the sending side? :confused: (1 Reply)
Discussion started by: sallender
1 Replies

10. UNIX for Advanced & Expert Users

rsync with the --delete option.

Tell me this - set me straight! the --delete option says "delete files that don't exist on the sending side" Does this mean and only mean that it will delete files from the DESTINATION that DON'T EXIST on the sending side? :confused: (2 Replies)
Discussion started by: sallender
2 Replies
Login or Register to Ask a Question