Replication to a non FreeNAS destination

Status
Not open for further replies.

mike tancsa

Cadet
Joined
Jan 2, 2015
Messages
8
I am trying to get replication working to our existing backup server (FreeBSD 10.x) from FreeNAS 9.3 stable using a non root destination user. Everything seems to send over just fine, but the task fails at the end with the following errors


10.28.13.254:zbackup1/naslan/backups failed: cannot mount 'zbackup1/naslan/backups/adminhomes': Insufficient privileges cannot mount '/zbackup1/naslan/backups/adminhomes/mtancsa': failed to create mountpoint cannot mount '/zbackup1/naslan/backups/adminhomes/ptuser': failed to create mountpoint cannot mount 'zbackup1/naslan/backups/cifshares': Insufficient privileges cannot mount 'zbackup1/naslan/backups/jails': Insufficient privileges cannot mount '/zbackup1/naslan/backups/jails/vboxtest': failed to create mountpoint cannot mount '/zbackup1/naslan/backups/jails/virtboxes': failed to create mountpoint

I am sending to a non root user and created on the target server the uid naslan and granted the following perms

---- Permissions on zbackup1/naslan ----------------------------------
Local+Descendent permissions:
user naslan aclinherit,aclmode,allow,atime,canmount,clone,compression,create,destroy,mount,mountpoint,quota,receive,refquota,refreservation,release,reservation,send,share,snapshot,xattr

I allow for vfs user mounting but the problem seems to be something else. I am guessing the mount point is made as uid naslan, but that fails, since the restore of some of those datasets are owned by root ?
On the target server I have

# ls -ld /zbackup1/naslan
drwxr-xr-x 3 naslan naslan uarch 5 Jan 6 10:35 /zbackup1/naslan
But the created mountpoints are owned by root ?

# ls -l /zbackup1/naslan/backups/
total 12
drwxr-xr-x 6 naslan naslan uarch 6 Jan 5 14:02 .
drwxr-xr-x 3 naslan naslan uarch 5 Jan 6 10:35 ..
drwxr-xr-x 8 rgreen rgreen uarch 11 Dec 4 15:14 .freenas
drwxr-xr-x 2 root wheel uarch 2 Dec 4 16:05 adminhomes
drwxr-xr-x 2 root wheel uarch 2 Dec 29 11:31 cifshares
drwxr-xr-x 2 root wheel uarch 2 Dec 5 09:57 jails

In the task option, I have "Recursively replicate and remove stale snapshot on remote side" checked on which is needed otherwise nothing everything gets backed up and the remote dataset is "zbackup1/naslan/backups"

Is there a way to do this ? The replication seems to work for the most part, as the output of zfs list on the target server shows the desired datasets and snapshots, just not mounted. And because of the mount failure, the task is also seen as 'failed' by the FreeNAS server
 

mike tancsa

Cadet
Joined
Jan 2, 2015
Messages
8
Note, all works fine with the remote user being root, but I would like not to have to permit root logins remotely. I suppose if I have to do this, perhaps limiting what commands are allowed to be executed in the authorized_keys file could mitigate the exposure?
 
D

dlavigne

Guest
Hi Mike! Were you able to find a satisfactory solution for this?
 

mike tancsa

Cadet
Joined
Jan 2, 2015
Messages
8
Hi Dru, not really. I was going to revisit it next week when I have a few more cycles. In the mean time, I am replicating to a temp box that I setup to allow remote root login.
 
Status
Not open for further replies.
Top