LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-27-2012, 04:05 PM   #1
genderbender
Member
 
Registered: Jan 2005
Location: US
Distribution: Centos, Ubuntu, Solaris, Redhat
Posts: 396

Rep: Reputation: 31
Rsync ignores incomplete files


I've got an rsync script which functions fine, however often only partial files are found on the destination - these files are neither resumed nor deleted. This is better explained with some examples:

Code:
Source:
~ # ls -alh /shares/files/An_big_file.mkv 
-rw-r--r--    1 User      jewab        1.2G Nov 28  2011 /shares/files/An_big_file.mkv

Destination:
freenas:~# ls -ltrh /mnt/Tank/An_big_file.mkv 
-rw-r--r--  1 504  admin   133M Jun 27 21:45 /mnt/Tank/An_big_file.mkv

The rsync command I've been using:
rsync -avrutz --delete -e ssh /shares/files/ root@$REMOTE_IP:/mnt/Tank/
What I want is for new files on the source to be rsynced over, files which dont exist on the source to be deleted and any files which are incomplete to be deleted (or resumed) another time. I also want to keep any files which exist on the destination (this is calculated by size). Any help at all - what am I doing wrong here?

Last edited by genderbender; 06-27-2012 at 04:12 PM.
 
Old 06-28-2012, 12:59 AM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

to resume the copying of incomplete files you probably want the --partial flag.

Evo2.
 
Old 06-28-2012, 03:06 AM   #3
genderbender
Member
 
Registered: Jan 2005
Location: US
Distribution: Centos, Ubuntu, Solaris, Redhat
Posts: 396

Original Poster
Rep: Reputation: 31
Hmm, slightly different that way. Partial retains the file name, but doesn't finish off the transfer. Without it the files are named "an_big_file.mkv.54TRFFE" (for example) and so the following time they're deleted (as the file doesn't exist on the destination). Perhaps I'm running an odd version of rsync or something?
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rsync: "Invalid or incomplete multibyte or wide character (84)" don_wombat_73 Linux - Newbie 4 05-14-2013 02:10 PM
Could I run rsync to download files from a server without rsync daemon? Richard.Yang Linux - Software 1 09-18-2009 04:08 AM
moving files from a location to other, preventing to move incomplete files pogo123 Programming 8 11-14-2008 06:21 AM
moving files from a location to other, preventing to move incomplete files pogo123 Linux - Newbie 2 11-13-2008 01:57 PM
Apache2 ignores CSS files rblampain Linux - Software 3 12-28-2005 09:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:44 AM.

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