rsync not syncing a file


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users rsync not syncing a file
# 1  
Old 06-29-2012
rsync not syncing a file

I am trying to sync the source tree into backup and somehow
this one file dumper.c is not in sync, see below after running the script:

Code:
/u/prj/dir$ l -tr dumper.c /v/tmp/prj_src/dir/dumper.c
-rw-rw-r--   1 prj    group      15635 Jun 20 16:28 /v/tmp/prj_src/dir/dumper.c
-rw-rw-r--   1 prj    group      15532 Jun 27 11:18 dumper.c

I added -vvv to the backup script:
Code:
 
SRC=/u/prj
TRG=/v/tmp/prj_src
/usr/local/bin/rsync -a -u -m -vvv \
        --include="*/" \
        --include="*.[ch]" \
        --include="*.scr" \
        --include="make*" \
        --include="*.ddl" \
        --exclude="*" \
        ${SRC} ${TRG}

After running the script the rsync output related to the file in question:
Code:
 
/u/prj/dir$ grep dumper /tmp/xx         
[sender] showing file prj/dir/dumper.c because of pattern *.[ch]
[sender] make_file(prj/dir/dumper.c,*,2)
[sender] hiding file prj/dir/dumper.o because of pattern *
recv_generator(prj/dir/dumper.c,535)
prj/dir/dumper.c is uptodate
send_files(535, /u/prj/dir/dumper.c)
recv_files(prj/dir/dumper.c)

Somehow it thinks the target is up to date.
rsync version is 3.0.5
Any idea what am I doing wrong?
# 2  
Old 06-29-2012
-u skips files with a newer mtime locally (place you are getting in sync) than on the remote (source of sync).

The only thing I saw as a possibility.
# 3  
Old 06-29-2012
As you can see the source is changed on 27th of June, the target is 20th of June, so that -u should have make rsync to updated it. Also, just want to point out that source and target are on the same system.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

rsync a file as it gets created and after 3 minutes old

- run a backup job - The jobs creates partial files one after the other, about 2 minutes interval. What i want to do is that while the job is still running or while a file was last modified or created 3 minutes ago, the file should be rsync to a remote server untill the last file has been... (4 Replies)
Discussion started by: malaika
4 Replies

2. Shell Programming and Scripting

Rsync Error: rsync: link_stat failed: No such file or directory (2)

I wish to copy all the files & folder under /web/Transfer_Files/data/ on mymac1 (Linux) to remote server mybank.intra.com (Solaris 10) /tmp/ location I am using Ansible tool synchronize module which triggers the unix rsync command as below:rsync --delay-updates -F --compress --archive --rsh=ssh... (2 Replies)
Discussion started by: mohtashims
2 Replies

3. Shell Programming and Scripting

Syncing Multiple Music Collections, Can rsync help?

Hello, I have two laptops one office and one personal. The office laptop is a Lenovo T430s 16GB RAM running Windows 7 and the Personal Laptop is a hp Pavilion dm4 Laptop dual booted with Windows 7 and Fedora 14. I have 3 music collections, one on my personal Laptop, one on office Laptop and... (3 Replies)
Discussion started by: ajayram
3 Replies

4. UNIX for Dummies Questions & Answers

Rsync whole folder and head of each file

Hello, I am trying to backup the whole folder which contains years of data and huge size, some files are > 10GB. I want keep the exact organization of the folder, except that for bigger file only part of it (say head -50, or simply only the name of the file) will be kept. Then the structure of the... (2 Replies)
Discussion started by: yifangt
2 Replies

5. Shell Programming and Scripting

Help with rsync file restore script

Hello Friends, I am trying to create an rsync file restore script. I will post want I have below and explain the problem I am having. #!/bin/bash # # Partial Rsync File Restore Script # # clear echo # Shell loads into /raid0/data/backup/bin/ cd .. # I cd to the backup... (1 Reply)
Discussion started by: jdavis_33
1 Replies

6. UNIX for Dummies Questions & Answers

rsync file list help

Is it possible to make rsync output a list of all the files transferred to a separate text file? If so how? I wondered if the --write-batch=FILE optionis what I need Thanks (1 Reply)
Discussion started by: barrydocks
1 Replies

7. Shell Programming and Scripting

rsync a single file

I have been using rsync scripts for a while and use them to sync directories across my servers. However i need to set up an rsync script to copy only one file from a server. Is this possible with rsync? If so how would i do this? I have looked on examples on the internet and only see examples for... (2 Replies)
Discussion started by: timgolding
2 Replies

8. Shell Programming and Scripting

rsync - update file on backup when file renamed on source

hi all, Please help me with rsync. I configured rsync to preserve timestamps using the -a option. When i renamed fileA to fileB on source machine I have to copies at the backup server. The aim is to keep the most recent file. fileA & fileB has same contents. When i renamed fileB to... (2 Replies)
Discussion started by: coolatt
2 Replies

9. UNIX for Advanced & Expert Users

rsync with particular file pattern

I'd like to rsync any files that end with 'rpt' under source dir called 'opt', and here is the command i tried: rsync -avz --include='*.rpt' --exclude='*' /opt /tmp -n but the list returned is a complete listing under opt. can anyone help out please? (2 Replies)
Discussion started by: jw_712
2 Replies

10. UNIX for Dummies Questions & Answers

Rsync file list

Hello, I'm trying to utilize rsync to backup 7 gigs of approximately 10,000 files, from what I've read this should be no sweat. However subsequent syncs seem to build an entirely new file list and the process takes a great deal of time. Reading the man page I'm not sure if I need to specify a file... (3 Replies)
Discussion started by: hexaplus
3 Replies
Login or Register to Ask a Question