I'm trying to figure out how to copy files between two linux machines.
Basically i made a user "rclone-user" on the server that I want to backup thru ssh (as I don't allow root login via ssh). But, that of cause inherit som priviliges issues where certain dirs and files are not accessible for the "rclone-user" (rclone-user has been added to sudoers group).
ex.: "-rw------- 1 root root 1381 Mar 12 19:16 ssh_host_dsa_key"
can only be copied/backed up if rclone-user becomes root.
Is there any clever way to make rclone execute as sudo with the ssh/sftp module? Here I am thinking a bit like in Ansible terms with the become: root flag.
Hmm, well you could
chmod u+s (setuid) the rclone binary which would cause it to run as root. This isn't good security practice but it might bet you out of a hole.
Thanks @ncw it actually seems like a good solution, I guess that the right would only be enforced in the host machine (backup server it self). But, it is non of the less a great solution for that case.
The alternative I consider would be making a tarball on the remote server of the mounts that needs backup. And then fetch that file with the backup server (hosting rclone) once a day or so.
The only "aber der bei" is that I made a script a couple of years back that only sync changes to be backed up: https://github.com/rune1979/rclone-script-templates
to minimized size and the abillity to recover single files. But, i guess a compressed tar would do fine too as i also made a full backup script.
Thanks for the best backup solution.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.