Hi all,
I am trying to back up a FreeBSD 8.2-RELEASE box (target-server.domain.local) to a second FreeBSD 8.2-RELEASE box (backup-server.domain.local) using sysutils/rdiff-backup, where the backup will be stored on a Samba mount. sysutils/rdiff-backup is installed on both machines.
The target to be backed up is accessed as root via ssh, where ssh key authentication has been configured and limited with the following in /root/.ssh/authorized_keys:
The server initiating the backup has the following in its .ssh/config file:
Before applying the ssh restrict command enty I was able to perform passwordless SSH into the machine to be backed up. I am able to test the ssh connection with the command:
I am able to perform backups when the destination directory is local to the backup-server, for example:
However, when I try to backup to a directory which is a Samba share it fails:
The Samba share is mounted with the following line in fstab:
The Samba mount is mounted with the following permissions:
So in summary, I am able to backup when the destination directory is local, but I am unable to backup when the destination directory is a Samba mounted share.
Any help or pointers would be very much appreciated.
Cheers,
Chris
PS I am able to write to /mnt/rdiff-backup_storeage. I've tested this by touching some files etc.
I am trying to back up a FreeBSD 8.2-RELEASE box (target-server.domain.local) to a second FreeBSD 8.2-RELEASE box (backup-server.domain.local) using sysutils/rdiff-backup, where the backup will be stored on a Samba mount. sysutils/rdiff-backup is installed on both machines.
The target to be backed up is accessed as root via ssh, where ssh key authentication has been configured and limited with the following in /root/.ssh/authorized_keys:
Code:
command="rdiff-backup --server --restrict-read-only /",from="backup-server.domain.local",no-port-forwarding,no-X11-forwarding,no-agent-
forwarding,no-pty ssh-rsa BIG_LONG_KEY rdiff-backup@backup-server.domain.local
The server initiating the backup has the following in its .ssh/config file:
Code:
Host target-server
Port my_port_number
User root
Before applying the ssh restrict command enty I was able to perform passwordless SSH into the machine to be backed up. I am able to test the ssh connection with the command:
Code:
$ rdiff-backup --test-server target-server::/home/chris
Testing server started by: ssh -C target-server rdiff-backup --server
Server OK
I am able to perform backups when the destination directory is local to the backup-server, for example:
Code:
$ rdiff-backup target-server::/home/chris /home/rdiff-backup/chris-test/ ; echo $?
0
However, when I try to backup to a directory which is a Samba share it fails:
Code:
$ rdiff-backup target-server::/home/chris /mnt/rdiff-backup_storeage/chris-test/; echo $?
Exception '' raised of class '<type 'exceptions.AssertionError'>':
File "/usr/local/lib/python2.7/site-packages/rdiff_backup/Main.py", line 304, in error_check_Main
try: Main(arglist)
File "/usr/local/lib/python2.7/site-packages/rdiff_backup/Main.py", line 324, in Main
take_action(rps)
File "/usr/local/lib/python2.7/site-packages/rdiff_backup/Main.py", line 280, in take_action
elif action == "backup": Backup(rps[0], rps[1])
File "/usr/local/lib/python2.7/site-packages/rdiff_backup/Main.py", line 334, in Backup
rpout.conn.fs_abilities.backup_set_globals(rpin, force)
File "/usr/local/lib/python2.7/site-packages/rdiff_backup/fs_abilities.py", line 922, in backup_set_globals
dest_fsa = FSAbilities('destination').init_readwrite(Globals.rbdir)
File "/usr/local/lib/python2.7/site-packages/rdiff_backup/fs_abilities.py", line 156, in init_readwrite
self.set_case_sensitive_readwrite(subdir)
File "/usr/local/lib/python2.7/site-packages/rdiff_backup/fs_abilities.py", line 304, in set_case_sensitive_readwrite
assert not upper_a.lstat()
Traceback (most recent call last):
File "/usr/local/bin/rdiff-backup", line 30, in <module>
rdiff_backup.Main.error_check_Main(sys.argv[1:])
File "/usr/local/lib/python2.7/site-packages/rdiff_backup/Main.py", line 304, in error_check_Main
try: Main(arglist)
File "/usr/local/lib/python2.7/site-packages/rdiff_backup/Main.py", line 324, in Main
take_action(rps)
File "/usr/local/lib/python2.7/site-packages/rdiff_backup/Main.py", line 280, in take_action
elif action == "backup": Backup(rps[0], rps[1])
File "/usr/local/lib/python2.7/site-packages/rdiff_backup/Main.py", line 334, in Backup
rpout.conn.fs_abilities.backup_set_globals(rpin, force)
File "/usr/local/lib/python2.7/site-packages/rdiff_backup/fs_abilities.py", line 922, in backup_set_globals
dest_fsa = FSAbilities('destination').init_readwrite(Globals.rbdir)
File "/usr/local/lib/python2.7/site-packages/rdiff_backup/fs_abilities.py", line 156, in init_readwrite
self.set_case_sensitive_readwrite(subdir)
File "/usr/local/lib/python2.7/site-packages/rdiff_backup/fs_abilities.py", line 304, in set_case_sensitive_readwrite
assert not upper_a.lstat()
AssertionError
1
$ Fatal Error: Lost connection to the remote system
The Samba share is mounted with the following line in fstab:
Code:
//BACKUP_USER@target-server/RDIFF-BACKUP /mnt/rdiff-backup_storeage smbfs rw 0 0
The Samba mount is mounted with the following permissions:
Code:
$ ls -ld /mnt/rdiff-backup_storeage
drwxr-xr-x 1 rdiff-backup wheel 16384 Jan 1 1970 /mnt/rdiff-backup_storeage
$ ls -ld /mnt/rdiff-backup_storeage/chris-test
drwxr-xr-x 1 rdiff-backup wheel 16384 Jun 1 11:39 /mnt/rdiff-backup_storeage/chris-test
So in summary, I am able to backup when the destination directory is local, but I am unable to backup when the destination directory is a Samba mounted share.
Any help or pointers would be very much appreciated.
Cheers,
Chris
PS I am able to write to /mnt/rdiff-backup_storeage. I've tested this by touching some files etc.