rsync stopped working

Bob Holtzman holtzm at cox.net
Wed Jan 20 11:08:44 UTC 2016


On Wed, Jan 20, 2016 at 05:38:51PM +0900, SATOH Fumiyasu wrote:
> Hi,
> 
> At Wed, 20 Jan 2016 01:11:58 -0700,
> Bob Holtzman wrote:
> > Running Debian 8.2, xfce 4.10, rsync 3.1.1-3. I just edited my backup script as follows:
> 
> Your backup script is broken. 

You've got me confused. The script line(s) you're telling me are broken are old ones out of use (notice the comment mark)
also my remark to the effect that the lines above the hash marks ........   

> 
> > #The first line deletes extraneous files. The second does not and is used for normal backups.
> > 
> > # rsync -vaHz --delete --exclude '/proc' --exclude '*.iso' --exclude '/sys' --exclude '/home/holtzm/Documents/*.iso' --exclude '/media'
> 
> This is a comment. I love comment.
> 
> >  /. /media/cf0a98ed-3c11-4107-b61e-f5139d024396/Jessie-laptop
> 
> This is NOT a comment.

This is the result of my folding the lines manually. It's only for my post, not the real script which runs flawlessly.

> 
> /bin/sh tries to invoke "/." as a command, but it fails.
> Try the following on your shell to reproduce it:
> 
>   $ /bin/sh
>   $ /. foo bar
>   sh: /.: Is a directory
> 
> > # rsync -vaHz --exclude '/proc' --exclude '/sys' --exclude '*.iso' --exclude '/home/holtzm/Documents/*.iso' --exclude '/media'
> >  /. /media/cf0a98ed-3c11-4107-b61e-f5139d024396/Jessie-laptop
> 
> Ditto.
> 
> > ##############################################################################################################################################
> > 
> > 
> >  rsync -vaHz --delete --exclude '/holtzm/exclude' /. /media/cf0a98ed-3c11-4107-b61e-f5139d024396/Jessie-laptop
> 
> --exclude option takes an extended glob pattern, not a file path.
> Use --exclude-from option instead and read rsync(1) manpage.

That totally escaped me. Thanks.

> 
> > Also, I just changed to an exclude file ($HOME/exclude) as follows:
> > 
> > '/dev'
> > '/lost+found'
> > '/proc'
> > '/media'
> > '/tmp'
> > '/*./*iso'
> 
> Remove all "'"s.

Noted.

> 
> > My problem is that when I run the script I get this error message:
> > 
> > root at localhost:/home/holtzm# scripts/backup
> > scripts/backup: line 4: /.: Is a directory
> > scripts/backup: line 7: /.: Is a directory
> 
> See above.
> 
> > sending incremental file list
> > rsync: mkdir "/media/cf0a98ed-3c11-4107-b61e-f5139d024396/Jessie-laptop" failed: No such file or directory (2)
> > rsync error: error in file IO (code 11) at main.c(674) [Receiver=3.1.1]
> 
> Create /media/cf0a98ed-3c11-4107-b61e-f5139d024396 before running rsync.
> Rsync does NOT create the parent directory of the destination.

I'm aware of that. The directory existed prior to my trying to run the script.




More information about the rsync mailing list