On Tue, 06 Oct 2020 15:38:14 +0200, Hans-Werner Kneitinger wrote:
> Hallo,
> I am running an RPi4 with latest RasbianOS. I want to do an backup some
> dirs/files on an Synology NAS via NFS nad rsync. It is working but mode
> attributes are not correct. User / Group are right.
>
Hmm.
I do something superficially similar:
1) attach a USB disk to my house server and mount it.
There is one partition on this disk.
2) for each of the four machines being backed up (three over my LAN the
4th is the house server
2a) launch rsync, run as root, on the house server to use an sshd
connection to read changed files from each machine to update
files on the USB disk. The files from each machine are backed up
to a separate root directory, named to match each host being backed
up.
3) When done, unmount the USB disk and store ot offline.
When I've needed to recover files from the backup, I've mounted the USB
disk on the host containing the master files and copied the files and
directories back off the backup disk. I've never had to correct user or
group IDs unless I'm restoring to a freshly formatted disk which hasn't
yet had user names restored, and even then, putting users and groups back
with adduser etc after restoring the files needs no tweaking of file
permissions provided I have a record of the corresponding user and group
ids and use them when recreating /etc/passwd and /etc/group.
I also do an overnight backup from the house server to another USB disk,
but this uses rsnapshot and takes about 8 minutes a night plus the same
time again for the weekly snapshot, which just shuffles file images on
the backup disk.
It looks like the main difference is that I don't mount the backup disk
on the host being backed up, which AFAIK has the side effect of
completely decoupling the user and group IDs in the two filing systems.
Maybe you could try that?
The rsync SSHD transfer may be a bit slower - can take between 10-40
minutes per host, depending on the size of the weekly distro update,
because I keep two generations of backup disk which means that each
weekly backup sees two weeks worth of data that needs to be copied
across, but at least I have no user/group id issues.
--
Martin | martin at
Gregorie | gregorie dot org
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|