Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 3260

General Questions • [Software] [SOLVED] [Software] Rsync and NFS

$
0
0
Hello Everyone,

I have built up a backup server on my local lan with a couple of 8tb drives mirrored together. My plan is to export shares from it in order to backup system files/folders. For this I am using rsync. Normally I do not have a problem on local backups on the same computer/server. However, I am failing to understand how to keep file permissions and ownership intact when rsyncing to the NFS share.

When I backup to the NFS share the file/folder owner is changed and the permissions are not preserved. This would be a real problem if I have to restore something like /etc as I would have to go thru and reset ownership and permissions on every file/folder. I assumed that rsync would preserve all this and thus restoring files back to the original computer/server it would have the correct permissions and ownership. I guess not the case. So, I am investigating on what I am doing wrong here. Its either a configuration issue in NFS / Rsync or I am just not understanding things correctly.

RNC2 = Backup server running NFS
exports file contains:

Code:

/mnt/md1/trex   10.0.1.1(rw,nohide,insecure,async,no_subtree_check)
TREX = My server connected to RNC2 via NFS
NFS mount info:

Code:

10.0.1.125:/mnt/md1/trex on /mnt/md1-backups type nfs4 (rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=10.0.1.1,local_lock=none,addr=10.0.1.125)
All computers on the same network.

The file permissions and ownership basically are not preserved. I have a work around right now. I tar up the directory, Then transfer it via NFS to the backup server and there I can uncompress it with :

Code:

tar --same-owner -xvf etc.tar
Id like to skip this step with tar and have the preserved permissions and ownership kept intact.

Statistics: Posted by Northpoint — 2024-04-29 09:36 — Replies 4 — Views 82



Viewing all articles
Browse latest Browse all 3260

Trending Articles