You are not logged in.

#1 2015-01-20 08:28:19

hydrosIII
Member
Registered: 2013-04-04
Posts: 127

rsync full system backup VPS to local NAS unprivileged user in ZFS

Hi
I have a VPS, that i want to backup to my local NAS server.
im trying with rsync command but i want a fully restorable backup,
In my NAS i have the ZFS filesystem, and a special system user called backups, that is in charge of making the different backups, using zfs on linux
This user has no root privileges, and it has a special zpool owned by him, just for the backups.

Here is my rsync one liner:

rsync -zHaAxv --numeric-ids --fake-super -e "ssh -i /respaldos/.keys/key" root@ip-adress:/* /backups/vps-system --exclude={/dev/*,/home/*,/sys/*,/run/*,/proc/*,/tmp/*,/media/*,/mnt/*}

However i'm getting all the permissions messed up, because rsync is running as a unprivileged user.

After some googling i found that i have to use the --fake-super option, and also i required a filesystem that support extendded atribbutes

it says that here:

http://tanguy.ortolo.eu/blog/article19/rsync-options

So i enabled the said exttended atributes for zfs, as for the zfs manual.

zfs set xattr=sa backups

I tried running the scripts, but the backups remains the same with all the permissions set to the unprivileged user named backup.
Im not sure of the xattrs are implemented, if so, how can i view that???, if not how can i enable that??

Is this a deficiency of zfs on linux????
Am i missing something???

Some workarounds i think they might work :

Use sudo, maybe the easiest workaround.
Use tar instead of rsync, or tar + rsync, however i think this is a waste of network bandwidth

Offline

Board footer

Powered by FluxBB