Re: [Hampshire] rsync usage

Top Page

Reply to this message
Author: john lewis
Date:  
To: hampshire
Subject: Re: [Hampshire] rsync usage
On Tue, 2 Oct 2007 10:14:54 +0100
Bob Dunlop <bob.dunlop@???> wrote:

> On Tue, Oct 02 at 12:46, Chris Dennis wrote:
> ...
> > But does geneweb have write permission on directory /var/lib/?
> > The error mentions /var/lib/geneweb/. -- note the final dot --
> > so it's trying to set the timestamp of the geneweb directory,
> > which means updating an entry in the parent directory.
>
> Actually you don't need write permission on the parent directory
> since time information etc is stored in the files inode (file meta
> info) which is not part of the directory. File creation, moving
> and deletion require write permission on the directory.
>
> Reading the manuals (in this case utime(2)) means you learn
> something every day.
>
> To set the times on a file to anything other than the current time
> you need to be the *owner* of the file or root. Write permissions
> and group ownership don't come into it.
>
>
> John, you either need to change ownership of the receive tree to
> your local user or run the rsync as root. Since your current
> errors only refer to directories you could add --omit-dir-times to
> the rsync flags but this is not a true solution and I'd predict
> problems in the future.


Thanks Bob and all who have responded

Running rsync as local user to ~/tmp works OK but as I need to be
able to access the data with a local copy of Geneweb the data needs
to be in /var/lib/geneweb, this is especially important if I
were to attempt rsyncing the data on landing with the data on
startx.co.uk.

I currently keep the data on startx updated by doing a backup of the
database on landing, scp the backup file to startx, ssh into startx
and recreate the database from the backup file keeping a copy of the
previous version 'just in case'.

The backup file is in plain text so there are no problems in copying
it and the recreate step is actually a good thing as it clears out
any 'blanks' in the data resulting from deletions to the original
database.

Changing ownership of the receive tree could cause problems with a
subsequent update of the Geneweb app (which created
the /var/lib/geneweb directory) so I'll go along with running
rsync as root since doing this resulted in a copy without any
error messages.

Using rsync to keep a copy of the data on 'localhost' as well as
having the original database on 'landing' gives me a safeguard
against the 3 scsi disk raid array on landing going belly up. :-)

--
John Lewis
Debian (Sid) with the GeneWeb genealogy package