Where to put user home directory for remote rsync over ssh?

Status
Not open for further replies.
Joined
Mar 15, 2016
Messages
6
I'm new to FreeNAS and bought a pre-configured iXsystems FreeNAS mini and was looking around for best practices for pulling from it to a remote backup server via rsync over ssh via key login. (the remote server is not a FreeNAS server)

Obviously I need on the FreeNAS server a user with a home directory that contains .ssh directory with private/public keys. I have no problem doing that but I would like to know WHERE that should be.

I found this site: https://www.iceflatline.com/2012/02/backup-freenas-files-remotely-using-freebsd-and-rsync/ which seems like a good resource, but when I go to my FreeNAS server via console I see there is no /home directory

#ls -l /

shows a softlink

/home -> /var/home

but it's a broken link. There's no /var/home directory.

The documentation on users ( http://doc.freenas.org/9.3/freenas_account.html#users ) does not specify where home directories go.

----

So - is this a normal setup to not have a /home directory? What's the standard place for users' home directories in FreeNAS? I know I could just stick one anywhere - but want to follow standards.

Thanks in advance.
 

jdong

Explorer
Joined
Mar 14, 2016
Messages
59
I ended up making a UNIX-permission dataset on my main ZFS pool under /mnt/zfspool/home, and putting all the home directories underneath there. Not sure what the recommended convention was. All the rest of my datasets were Windows-permissioned, and OpenSSH will refuse those ACL permission bits for its check of .ssh/authorized_keys(2)'s permissions.
 
Joined
Mar 15, 2016
Messages
6
After a lot of testing I think I've found something that works well. Leaving my notes here in case this helps someone else searching for answers. Note this is from someone with 30+ years of unix/linux experience and less than 1 year of FreeNAS/FreeBSD experience. This is testing with FreeNAS 9.3 and FreeNAS 9.10

1. Obviously you can't just put home directories "anywhere," e.g. /tmp , /proc, /boot, ....

2. The general consensus I've read is that you leave the freenas directories that relate to install alone

3. You can't just do a "mkdir /mnt/<whatever>" in the shell and use that as a mountpoint as with reboots that directory disappears

So what I decided to do and this seems to work well is to create a new dataset called "home" and the default place for that to be created is /mnt/<PoolName>/home

This gives access to the entire FreeNAS server for scripted ssh-based backups. This works well for the rsync-based backup scripts I'm using.

I've seen some discussion that best practices for scripts are to run them from a pool. Will be experimenting with that next.
 
Status
Not open for further replies.
Top