#3359 Issue open
: BACKUP_PROG=rsync: Is it possible to backup and restore to/from an NFS share that has root squash enabled?¶
scook207 opened issue at 2024-12-10 16:04:¶
I'm trying to use rsync to backup to an NFS share with root squash
enabled. It's not clear to me what root squash enabled means, but I
believe all root file permissions are mapped to the nobody user.
I'm getting lots of errors like the one below in the
rsync-
2024/12/07 14:54:28 [17059] rsync: chown "/tmp/rear.CClpFWqalqYxnZo/outputfs/watch/backup/home/bs/.cache/evolution/addressbook" failed: Operation not permitted (1)
AI and Google searches indicate that this is being caused by "root squash enabled" on the NFS share. AI suggests adding these options to the rear command:
sudo rear -v mkbackup -- --rsync-options="--no-owner --no-group"
I suspect that if I use those options, then I'll be unable to perform a restore from the backup since all the file permissions will be set to nobody:nobody.
Any tips on how to configure Relax-and-Recover to backup to an NFS share with root-squash enabled?
Happening on serveral servers. Right now I'm troubleshooting a RHEL 6.10 server running ReaR 2.4.
Thanks,
SC
pcahyna commented at 2024-12-10 17:47:¶
-- --rsync-options="--no-owner --no-group"
I am afraid that AI has made that up.
pcahyna commented at 2024-12-10 17:48:¶
Please show your local.conf file (without any passwords / secrets of course)
scook207 commented at 2024-12-11 15:15:¶
Looks like site.conf is being used to configure rear. Here are the contents:
BACKUP=NETFS
BACKUP_PROG=rsync
BACKUP_URL=nfs://hetnas1/mnt/tank/backups/rear_backups
AUTOEXCLUDE_AUTOFS=y
BACKUP_RSYNC_OPTIONS=(--sparse --archive --hard-links --numeric-ids
--stats --log-file="$LOG_DIR/rsync-$HOSTNAME.log")
BACKUP_OPTIONS=nfsvers=3,nolock
local.conf contains the commented out default message "This file etc/rear/local.conf..."
Thanks,
SC
gdha commented at 2024-12-17 13:14:¶
@scook207 Why not using the BACKUP=RSYNC
workflow? Have a look at
/usr/share/rear/conf/default.conf
file for how-to...
pcahyna commented at 2024-12-17 15:37:¶
@scook207
BACKUP=NETFS
BACKUP_PROG=rsync
I see, not sure if there is some rsync trick to make it work under such
conditions (you can try --fake-super
, but you will need extended
attributes enabled on the share). The easiest option is to use tar
(which is the default for BACKUP_PROG
) instead of rsync
, if a
single tarball as the backup is enough for you. Another option is to use
BACKUP=RSYNC
as @gdha has suggested, if rsync
can connect to your
backup location (either over ssh
or over the rsync protocol).
[Export of Github issue for rear/rear.]