Re: [Hampshire] Rsync question

Top Page

Reply to this message
Author: Tim
Date:  
To: hampshire
Subject: Re: [Hampshire] Rsync question
On Monday 23 June 2008 18:20:15 Damian Brasher wrote:
> Vic wrote:
> > rsync is a little peculiar in how it does its exclude patterns; they need
> > to be the pattern rsync sees, not the absolute pathname. So you woud want
> > something along the lines of "--exclude=/zunk". Use the -v option to show
> > you the patterns you've got...
>
> As a foot note - if using an absolute pathway then a trailing / is needed
> unless you are pointing to a filename not a directory (although I have
> never excluded a single file). the --exclude option will also listen to ~/
> (home directory) prefix without double quotes.
>
> So
>
> rsync -av --exclude=/mnt/sdb1/zunk/ --delete /mnt/sdb1/ /mnt/sdc1/backups/
>
> Should be OK.
>
> To keep track of the files you archive and delete, as the 'a' switch is a
> combination of switches designed to optimize rsync operation for archiving
> (-rlptgoD), at little cost you can add a log file...
>
> rsync -av --exclude=/mnt/sdb1/zunk/ --delete
> --log-file=/mnt/sdb1/rsync_log /mnt/sdb1/ /mnt/sdc1/backups/
>
> Lee Lawrence wrote:
> >rsync -av --exclude="zunk/**" --delete /mnt/sdb1/ /mnt/sdc1/backups
>
> Would this be OK, I wonder, if a directory you wanted to archive was a
> sub-directory of ../sdb1/../.. was also named zunk? I have generally
> avoided using pattern matches like this just in case.
>
> Vic wrote:
> >--delete is the option you want; I don't know if --delete-after implies
>
> it...
>
> The --delete and --delete-before remove files on the receiving location
> that are no longer located on the sending location before continuing
> archiving of the remainder of the files - these are the same default
> option.
>
> Damian
>
> --
> Damian L Brasher
> http://www.diap.org.uk



Right I ran Damian command and picked up a few errors (1), now I don't think
this is an error with the command more like an anomorally with the drive as I
had similar errors yesterday until I umounted and remounted the drive

So un-mounted re-mounted the drive, I deleted a few files from Zunk on the
sending side and added a new file (32mb zip file) to zunk (sending side) and
then reran the command, output log file is here (2)

It looks like it ignored zunk for updating from the sending to receiving but
updated the receiving to reflect the deleted files on the sending (I think I
got that right)

There is a mass of errors at the start regarding read only files, but to me
they look like some form of temp files

/mnt/sdc1/backups/Zunk/.christopherjonathanlukeoz6v2.jpg.0Hi1jq

The correct path and file name is

/mnt/sdc1/backups/Zunk/christopherjonathanlukeoz6v2.jpg

These files were originally saved in linuxs, dropped into zunk, picked up by a
PC running Vista, resaved into zunk from the vista box.

Now its just occured to me that zunk (sdb1) is actually fat32 while sdc1 is
ext3, could this be part of the problem


(1)error text here http://www.windfreaks.co.uk/myimages/rsyncerror.txt
(2) outputlog file http://www.windfreaks.co.uk/myimages/rsync_log

I am not to worried about it deleting from the receiving zunk to reflect
changes made in the sending zunk because once I have this working properly I
will delete the receiving zunk from the back file anyway (hence the exclude)

Any thoughts on the errors??

Tim