rsync stopped working

Joe josephj at main.nc.us
Wed Jan 20 08:46:41 UTC 2016


I'm not a whiz at this, but a couple of things look odd.

1) Your exclude file is *probably* in /home/holtzm - not in /holtzm

2) I don't think your source should be /. (although it might be right - 
but it looks like rsync doesn't like it). I think that /. ought to be 
the same as /   . Usually it would be something like  /* or */ if you 
were already in the root directory.

I think the problem is that rsync wants files to backup, not just a 
directory. /* gives it files (including directories because -r 
(recursive) is implied by -a).

You also have to be aware that using a source path without a trailing 
slash gets you the top level directory (which often is not what you 
want). Adding the trailing / gets all the files in the directory without 
that top level.

Since you are using -v, you may want to consider also using -i which 
gives you a lot of better information when something goes wrong.

I'm sure some of the experts on this list can explain the /. issue way 
better than I did, but this may be enough to get you unstuck.

HTH

Joe

On 01/20/2016 03:11 AM, Bob Holtzman wrote:
> Running Debian 8.2, xfce 4.10, rsync 3.1.1-3. I just edited my backup script as follows:
>
> #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'
>   /. /media/cf0a98ed-3c11-4107-b61e-f5139d024396/Jessie-laptop
>
> # rsync -vaHz --exclude '/proc' --exclude '/sys' --exclude '*.iso' --exclude '/home/holtzm/Documents/*.iso' --exclude '/media'
>   /. /media/cf0a98ed-3c11-4107-b61e-f5139d024396/Jessie-laptop
>
>
> ##############################################################################################################################################
>
>
>   rsync -vaHz --delete --exclude '/holtzm/exclude' /. /media/cf0a98ed-3c11-4107-b61e-f5139d024396/Jessie-laptop
>
> # rsync -vaHz --exclude '/holtzm/exclude' /. /media/cf0a98ed-3c11-4107-b61e-f5139d024396/Jessie-laptop
>
>
> The lines above the hash marks are the original script which worked flawlessly.
>
> Also, I just changed to an exclude file ($HOME/exclude) as follows:
>
> '/dev'
> '/lost+found'
> '/proc'
> '/media'
> '/tmp'
> '/*./*iso'
>
> 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
> 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]
>
> Tried running searches w/ no luck. Checked all the docs I could find w/ no luck.
>
> Obviously, I screwed something up with the changes.
>
> Any pointers appreciated.
>




More information about the rsync mailing list