Need Help with NFS file permissions

Todd Millecam tyggna at gmail.com
Fri Dec 26 16:35:46 MST 2014


Samba is worse for file permissions as they're all tied to an smbuser
rather than a unix user id.  MacOS supports rsync, and should come with it
built in (along with cron) so rsnapshot should work fine there too but I'm
not a Mac guy so I don't know for sure.  For day-to-day access and using
this as a shared network mount, you should just stick with NFS, and look
into setting up some network users via NIS--that'll let you configure NFS
to preserve file permissions.

On Fri, Dec 26, 2014 at 3:45 PM, Mark Phillips <mark at phillipsmarketing.biz>
wrote:

> Todd,
>
> Thanks for your comments. I was not very clear on how I am making the
> backups.
>
> Linux boxes - The machine with the usb drive attached is running rsnapshot
> (ssh & rsync) to backup all the Linux boxes to the usb drive. The rsnapshot
> script is run by cron at appropriate times. Restoring from the backups will
> most likely be via ssh/cp or maybe an rsync if I need to move a lot of
> files.
>
> MacOS - the one laptop will access the usb drive over NFS using some
> native MacOS backup application. I could have used Samba, but it is slower
> than NFS, so I thought I would give NFS a try. I have to buy some software
> for the Mac box to read/write ext4, but it is not very expensive. Restores
> will be via NFS mount on the Mac box. I am a little out of my depth with
> the Mac box (Macbook Pro).
>
> Do you think I should switch to Samba for the MacOS backup?
>
> Thanks!
>
> Mark
>
> On Fri, Dec 26, 2014 at 1:45 PM, Todd Millecam <tyggna at gmail.com> wrote:
>
>> NFS exports might not be the technology you want to use.  If it's
>> possible, I'd setup an rsync script, because that will let you preserve
>> user permissions, directory structure, time stamp, and let you resume
>> partial backups, and it's much easier to set it up on a timer via a cron
>> script--it takes about 20 minutes to learn how to use and script with so
>> it's really a good time investment.  I was in a shop that did NFS exports
>> for a while only to find the backups weren't always viable and only had
>> about a 70% success rate for a usable nightly backup.  When we switched
>> over to rsync, we would only get one bad backup every two months.
>> NFS just backs things up based on the Unix User ID in /etc/passwds (or
>> whatever PAM authentication module you're using, so you'd really need to
>> setup NIS in your house for this to work properly) on the host machine.  If
>> the user doesn't exist, it will preserve the user id and permissions by
>> default, but if that user/group doesn't exist on the server hosting the
>> backup, then you won't have read-write permissions to restore it.
>>
>> On Fri, Dec 26, 2014 at 12:52 PM, Mark Phillips <
>> mark at phillipsmarketing.biz> wrote:
>>
>>> I am setting up a usb drive to act as a NAS for backing up a couple of
>>> computers (Linux and Mac) on my network. I have it running, but I want to
>>> make sure I have the correct settings.
>>>
>>> I read quite a few Debian and Ubuntu howtos about NFS, but they
>>> sometimes offered conflicting information. For the backups, I want to
>>> preserve the file permissions, time stamp, etc.
>>>
>>> In /etc/exports I have
>>>
>>> /media/backup
>>> 192.xxx.xxx.0/24(rw,sync,root_squash,no_subtree_check,fsid=0,insecure)
>>>
>>> The insecure is for Macs to access on ports other than 1024....at least
>>> that is what one article said. It does not mean the connection is
>>> insecure....
>>>
>>> /etc/fstab for the usb drive
>>>
>>> UUID=6997d1c2-5ed7-4f32-9d5e-564cadd7bc6c /media/backup ext4
>>> rw,nodev,noexec,noatime,nodiratime,sync,data=ordered 0  0
>>>
>>> Thanks!
>>>
>>> Mark
>>>
>>> ---------------------------------------------------
>>> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
>>> To subscribe, unsubscribe, or to change your mail settings:
>>> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
>>>
>>
>>
>>
>> --
>> Todd Millecam
>>
>> ---------------------------------------------------
>> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
>> To subscribe, unsubscribe, or to change your mail settings:
>> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
>>
>
>
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
>



-- 
Todd Millecam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phxlinux.org/pipermail/plug-discuss/attachments/20141226/fc5a1189/attachment.html>


More information about the PLUG-discuss mailing list