I could do with some help getting my bulk file copy to work, please.
Scenario
I have tens of GB of photos that I would like to upload to my servage account overnight when my ADSL bandwidth is free. The photos get added to on a regular basis and I would like any additions to be copied up automatically overnight. It will take many nights to complete the initial upload so the process has to cope with being stopped and restarted. If I am ever stupid enough to delete any files or folders locally I want to ensure that the delete is not propagated to the server.
Attempted Solution
Use curlftpfs to mount my servage space as a local directory and then use rsync to copy the files over.
curlftpfs
*******:$$$$$$$@ftp.servage.net /mnt/ftp
rsync -a /root/pictures /mnt/ftp
Problem
This worked once for a short while for a few hundred MB but now when ever I try to run it I it fails. Everything is OK while it is check existing directories and it starts uploading the first photo and then fails. I think this is at the point that it is finishing the first photo.
There an rsync patch on samba.org for using fsync() to close the file, I think.
fsync() patch
http://samba.org/ftp/unpacked/rsync/patches/fsync.diffuse
It would probably be quicker to write my own script using just ftp, but I wanted to use the available tools.
Does anyone have any views on whether if i compile this in it might help or any other hints?
I know "compile and see", I just thought I'd ask before going to the bother. Is this even a sensible strategy architecturally?
*********************************************************
output from rsync
*********************************************************
sh-3.00# rsync -h
rsync version 2.6.4 protocol version 29
sh-3.00# rsync -vai --bwlimit=50 --stats /root/pictures /mnt/ftp
building file list ... done
.d..t.... pictures/
.d..t.... pictures/digital camera/
.d..t.... pictures/digital camera/01/
>f+++++++ pictures/digital camera/01/IMGP0013.JPG
>f+++++++ pictures/digital camera/01/IMGP0014.JPG
rsync: writefd_unbuffered failed to write 4 bytes: phase "unknown" [sender]: Broken pipe (32)
rsync: close failed on "/mnt/ftp/pictures/digital camera/01/.IMGP0013.JPG.0lwcXm": Operation not permitted (1)
rsync error: error in file IO (code 11) at receiver.c(642)
rsync: connection unexpectedly closed (538 bytes received so far) [generator]
rsync error: error in rsync protocol data stream (code 12) at io.c(420)
rsync: connection unexpectedly closed (70 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(420)
****************************************************
output from curlftpfs running at the same time, started first!
****************************************************
sh-3.00# curlftpfs -V
curlftpfs 0.9 libcurl/7.15.4 fuse/2.5
sh-3.00# curlftpfs -d
*******:$$$$$$$@ftp.servage.net /mnt/ftp
unique: 1, opcode: INIT (26), nodeid: 0, insize: 56
INIT: 7.7
INIT: 7.5
unique: 1, error: 0 (Success), outsize: 40
unique: 2, opcode: STATFS (17), nodeid: 0, insize: 40
...
FLUSH[134774616]
unique: 537, error: -1 (Operation not permitted), outsize: 16
unique: 538, opcode: RELEASE (18), nodeid: 5, insize: 56
RELEASE[134774616] flags: 0x8002
unique: 538, error: 0 (Success), outsize: 16
unique: 539, opcode: LOOKUP (1), nodeid: 1, insize: 49
LOOKUP /pictures
NODEID: 2
unique: 539, error: 0 (Success), outsize: 136
unique: 540, opcode: LOOKUP (1), nodeid: 2, insize: 55
LOOKUP /pictures/digital camera
NODEID: 3
unique: 540, error: 0 (Success), outsize: 136
unique: 541, opcode: LOOKUP (1), nodeid: 3, insize: 43
LOOKUP /pictures/digital camera/01
NODEID: 4
unique: 541, error: 0 (Success), outsize: 136
unique: 542, opcode: LOOKUP (1), nodeid: 4, insize: 61
LOOKUP /pictures/digital camera/01/.IMGP0013.JPG.0lwcXm
NODEID: 5
unique: 542, error: 0 (Success), outsize: 136
unique: 543, opcode: UNLINK (10), nodeid: 4, insize: 61
UNLINK /pictures/digital camera/01/.IMGP0013.JPG.0lwcXm
unique: 543, error: 0 (Success), outsize: 16
unique: 544, opcode: FORGET (2), nodeid: 5, insize: 48
FORGET 5/2
delete: 5
unique: 545, opcode: STATFS (17), nodeid: 0, insize: 40
unique: 545, error: 0 (Success), outsize: 96
unique: 546, opcode: STATFS (17), nodeid: 0, insize: 40
unique: 546, error: 0 (Success), outsize: 96
unique: 547, opcode: STATFS (17), nodeid: 0, insize: 40
unique: 547, error: 0 (Success), outsize: 96
TIA
_________________
Will