LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,592
Blog Entries: 2

Rep: Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047
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,040

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
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: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,592
Blog Entries: 2

Rep: Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


All times are GMT -5. The time now is 01:37 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration