LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo
User Name
Password
Gentoo This forum is for the discussion of Gentoo Linux.

Notices


Reply
  Search this Thread
Old 01-25-2012, 09:31 AM   #1
MarcusWebb1966
Member
 
Registered: Mar 2011
Posts: 58

Rep: Reputation: 0
Lightbulb Backup question


Hi

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.
 
Old 01-25-2012, 11:40 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
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.
 
Old 01-26-2012, 04:33 AM   #3
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
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.
 
Old 01-30-2012, 07:57 AM   #4
MarcusWebb1966
Member
 
Registered: Mar 2011
Posts: 58

Original Poster
Rep: Reputation: 0
Excellent suggestions from both of you.

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?
 
Old 01-30-2012, 08:25 AM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by MarcusWebb1966 View Post
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.
 
  


Reply

Tags
backup, privileges, security, ssh



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I have a question in Backup rajini23 Linux - Server 3 10-13-2011 07:21 AM
backup question werfer Linux - General 4 08-12-2009 02:06 PM
backup question - NFS share in Ubuntu 9.04 backup to READYNAS NV+ newellrp1 Linux - Newbie 3 05-19-2009 03:57 PM
Backup question aescott Linux - General 4 10-23-2008 04:34 PM
backup question d1l2w3 Mandriva 8 01-08-2006 08:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo

All times are GMT -5. The time now is 12:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration