I am currently backing up remote OS' while preserving the permissions using rsync:

rsync -aAX --numeric-ids --delete ... root@X.X.X.X:/ /backup/server/

Now I want to backup the backup to a third party. I currently have:

tar --xattrs -czpf - "/backup/server/" | openssl enc -aes-256-cbc -a -salt -pass pass:"$KEY" -out "/backup/server.encr"

Which will compress and encrypt while preserving permissions.

I would eventually like to write this in Go but it seems a bit complicated the preserving of permissions are there some alternative all in one libraries to do this?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.