LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 09-15-2010, 02:28 PM   #1
rogerw05465
LQ Newbie
 
Registered: Nov 2009
Location: Baltimore MD
Distribution: Ubuntu 10.04
Posts: 5

Rep: Reputation: 1
(ns)sbackup.conf file meanings


Using NSsbackup on Ubuntu 10.04 desktop. Generally all is successful - except for two things.

First: If my USB WD Passport destination drive is not awake at the time the backup is started, the backup fails. But if I run ls -al on the drive, that wakes it up enough to take the backup. How to deal with this problem?

Second, I have a question on the meanings of one of the commands: "format". In some examples I see "format = none", in others "format=1". What do these mean? Is this related to what type of compression might be being used after the tarball is created? Compression type (by that name) is not mentioned in the /etc/nssbackup.conf file, for instance.

Thanks for any and all help

Roger
 
Old 09-16-2010, 10:50 AM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,017

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
I can only answer your first Q:
To wake up the drive, you need to wrap your call to nssbackup in a little bash script that wakes the drive up before calling nssbackup
It's very simple:

Code:
#!/bin/bash
ls /path/to/backup > /dev/null
/path/to/nssbackup  options
Name the script whatever you like, make it executable chmod +x /path/to/wrapper and then call it.

http://www.google.com/linux (bookmark that link - it's very useful for all things linux) may help you with your other Q.
 
Old 09-17-2010, 09:29 AM   #3
rogerw05465
LQ Newbie
 
Registered: Nov 2009
Location: Baltimore MD
Distribution: Ubuntu 10.04
Posts: 5

Original Poster
Rep: Reputation: 1
Tredegar, thanks for this - and it is exactly what I tried as well, thinking to then run that script at a certain time via cron. The failure there? I have to run nssbackup via sudo right now, so here we have a fork to two possible paths: "How to call sudo in a script?" is the first fork, and that would be interesting to know how to do. The second fork is that the nssbackup log file says the nssbackup process is reverting to the user rogerw (me). I wonder if I really do need to be running nssbackup through sudo. For the latter issue, can I just chmod the nssbackup program to rogerw:rogerw and have it run happily without sudo? I guess that would work if all the files it was backing up were accessible by rogerw. Thoughts?

Roger
 
Old 09-17-2010, 09:37 AM   #4
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,017

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
Quote:
"How to call sudo in a script?"
You can't, or shouldn't if you want the backup to run unattended, and keep your system secure.

Backups are generally best run as root anyway (that way all your users can be backed up).

You could run your backup from root's crontab, then it'd be run as root.

I don't use nssbackup, (I just use rsync, which is fast, and easy ) so I can't help you with how it works.
 
  


Reply


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
restoring files from sbackup maskiepop Linux - Newbie 3 12-11-2008 07:33 AM
SBackup Destination Permissions vba_djs Linux - Newbie 0 05-03-2007 09:07 AM
LXer: Backup and Restore Ubuntu System using Sbackup LXer Syndicated Linux News 0 03-21-2007 04:01 PM
Is lilo.conf file format is same for grub.conf? Chundo Linux - Newbie 1 01-30-2006 06:21 PM
saving changes to apache2/conf/httpd.conf file Zaius Linux - Newbie 6 01-09-2004 11:45 PM


All times are GMT -5. The time now is 02:43 PM.

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