[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [rdiff-backup-users] sshfs: workaround and test results
From: |
Andreas Olsson |
Subject: |
Re: [rdiff-backup-users] sshfs: workaround and test results |
Date: |
Mon, 7 Jan 2008 01:52:09 +0100 |
User-agent: |
KMail/1.9.6 (enterprise 0.20070907.709405) |
On Sunday 06 January 2008 14:09:55 Andreas Olsson wrote:
> On Sunday 06 January 2008 12:43:43 Andreas Olsson wrote:
> > Anyhow, with that workaround all the tests I have run against a
> > sshfs-mount have worked really well. No errors to report.
>
> Well, it seems as if I didn't run enough tests before I wrote that :-)
>
> If you run rdiff-backup as a normal user (none-root) against a sshfs-mount
> where the files are owned by a different UID on the remote host, then there
> can be some issues. I will return when I've had time to look more into it.
Here comes an output on what works and what doesn't work when you run
rdiff-back as a normal user and the uid on the other side of the sshfs differs
address@hidden:~$ rdiff-backup --no-hard-links temp/source/ mnt/remote/
address@hidden:~$ echo foo > temp/source/newfile
address@hidden:~$ rdiff-backup --no-hard-links temp/source/ mnt/remote/
address@hidden:~$ echo bar >> temp/source/newfile
address@hidden:~$ rdiff-backup --no-hard-links temp/source/ mnt/remote/
address@hidden:~$ rdiff-backup -l mnt/remote/
Fatal Error: Bad directory mnt/remote.
It doesn't appear to be an rdiff-backup destination dir
address@hidden:~$ rdiff-backup --verify mnt/remote/
Fatal Error: Bad directory mnt/remote.
It doesn't appear to be an rdiff-backup destination dir
address@hidden:~$ rdiff-backup -r now mnt/remote/ temp/restore/
Fatal Error: Could not find rdiff-backup repository at mnt/remote
address@hidden:~$ rdiff-backup
mnt/remote/rdiff-backup-data/increments.2008-01-07T01\:11\:11+01\:00.dir
temp/restore/
Fatal Error: Source
mnt/remote/rdiff-backup-data/increments.2008-01-07T01:11:11+01:00.dir is not a
directory
address@hidden:~$ mkdir temp/local
address@hidden:~$ rsync --archive mnt/remote/ temp/local/
address@hidden:~$ rdiff-backup -l temp/local/
Found 2 increments:
increments.2008-01-07T01:11:11+01:00.dir Mon Jan 7 01:11:11 2008
increments.2008-01-07T01:11:34+01:00.dir Mon Jan 7 01:11:34 2008
Current mirror: Mon Jan 7 01:12:36 2008
address@hidden:~$ rdiff-backup --verify temp/local/
Every file verified successfully.
address@hidden:~$ rdiff-backup
temp/local/rdiff-backup-data/increments.2008-01-07T01\:11\:11+01\:00.dir
temp/restore/
In short it seems as if write operations work, but not read operations.
Obviously you can actually read all the files, just that rdiff-backup
somehow seems to think it can't?
A workaround for this trouble seems to be to specify your
local uid when you do you sshfs-mount. (-o uid=LocalUID)
This is the part where I perhaps should write a few words about sshfs-mounts
for those of you who aren't familiar with it. When you normally do a
mount the remote files shows up as owned by the remote uid, which
can be a completly diffrent user on your system. You still have full
access to the files in question thought. When mounting with the
option above the files actually lists as being yours.
I wonder if this isn't something which might be fixed in rdiff-backup?
Without actually understanding what is happening inside the program
it seems more like that it doesn't think that it can read the files in
question then that it can't read them for real.
--
Andreas Olsson
http://www.andreasolsson.se/
signature.asc
Description: This is a digitally signed message part.