GentooThis forum is for the discussion of Gentoo Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
This is really non-specific as far as Distros go, however here's my problem:
I've got a low-privileged user that connects from our office to our servers in internetland. Part of the tasks it needs to perform is to backup key data from our system(s). Now aside from the files it's backing up it has also recently been decided (owing to a server collapse) that it would be a good idea if the backup also contained the contents of folder /etc (and all sub-folders) as well as /var/spool/crontab.
I could up the privileges for the user, but I'd be interested to hear if anyone else has any obvious or less than obvious methods for achieving the same result, preferably without compromising the required security for these folders.
Create a backup script that does the backup job of those folders. Setup sudo and allow the user to use the sudo command for exactly that script, not more.
Unless it's very difficult to do it without human intervention, you could just trash that whole idea and setup a cron script to do the work for you. Then it could upload the files somewhere, or mail them, or put them into a dropbox or whatever you prefer.
I have a question relating to this, which may enlighten, and/or change your opinions of how this may be achieved.
We currently use rsync for the job. If I were to use rsync for this purpose, is it possible to have the rsync at the far end execute as a sudo'd user to get the information back? If not, how about an rsync daemon?
If I were to use rsync for this purpose, is it possible to have the rsync at the far end execute as a sudo'd user to get the information back?
If I understand you right (let rsync do the job via script on the remote machine connecting to the backup server) you don't need sudo, just set up a cron job as root for that script.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.