nssbackup cron job not created

Asked by ablu on 2009-03-02

I need to schedule nssbackup to create backups every day. When I use the tab "time" to set up time for backups, it saves appropriate line in /etc/nssbackup.conf:
[log]
file = /var/log/nssbackup.log
level = 20

[places]
prefix = /usr

[schedule]
cron = 0 3 * * *
....

But nothing happens when that time comes.
There is also no entry in crontab for root:

# crontab -l
no crontab for root

I am using nssbackup 0-2.0 RC5

Question information

Language:
English Edit question
Status:
Answered
For:
nssbackup Edit question
Assignee:
No assignee Edit question
Last query:
2009-03-23
Last reply:
2009-12-30
Launchpad Janitor (janitor) said : #1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Hi,

NSsbackup doesn't use crontab to schedule jobs. It links a file to /etc/cron.d which contains the cron information.
Hope that this answers to you question.

Cheers
Aziz

ablu (ablu) said : #3

But why it does not make backups at specified time? Do I need some extra configuration to force it?

Launchpad Janitor (janitor) said : #4

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Anton (feenstra) said : #5

ablu,

I've seen nssbackup link the wrong file under /etc/cron.d. Specifically,
it links to the nssbackup directory, and not the nssbackup executable.

Look for a symbolic link named 'nssbackup' that lives under /etc/cron.d,
and check what it refers to. If it refers to the directory (e.g.,
/usr/local/nssbackup), delete the link and make a new one to the
executable (e.g., 'sudo ln -s /usr/local/nssbackup/nssbackup
/etc/cron.d/daily').

--
Groetjes,

Anton
  _____________ _______________________________________________________
| | |
| _ _ ___,| K. Anton Feenstra |
| / \ / \'| | | IBIVU/Bioinformatics - Free University Amsterdam |
|( | )| | | De Boelelaan 1083A - 1081 HV Amsterdam - Netherlands |
| \_/ \_/ | | | Tel +31 20 59 87783 - Fax +31 20 59 87653 - Room P136 |
| | <email address hidden> - www.few.vu.nl/~feenstra/ |
| | "Yeah, uh uh, Neil's Head !" (Neil) |
|_____________|_______________________________________________________|

Anton (feenstra) said : #6

Change question status to reflect my earlier message.

lastico (jojo-lastico) said : #7

thanks Anton,

In fact, I understand it is a problem of path to execute nssbackup, so I modified the original file (/etc/cron.d/nssbackup) to obtain this. With this configuration i have a backup every hour :

SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

0 * * * * root if [ -x '/usr/share/nssbackup/nssbackup' ]; then /usr/share/nssbackup/nssbackup; fi;

So, this modification is a solution to solve my problem but i prefer your method which consist to create a link. When i create a link with your command i get a link named "daily' with the contain :

if [ -x /usr/bin/nssbackupd ]
then /usr/bin/nssbackupd
elif [ -x /usr/local/bin/nssbackupd ]
then /usr/local/bin/nssbackupd
fi

so the link refer to the good target but there is not any param of cron. Must we add : 0 * * * * root ?

thanks for your help !!

ps : sorry for my low level in english but i do my best

Anton (feenstra) said : #8

lastico wrote:
> Question #62814 on NSsbackup changed:
> https://answers.launchpad.net/nssbackup/+question/62814
>
> lastico requested for more information:
> thanks Anton,
>
> In fact, I understand it is a problem of path to execute nssbackup, so I
> modified the original file (/etc/cron.d/nssbackup) to obtain this. With
> this configuration i have a backup every hour :
[...]
> so the link refer to the good target but there is not any param of cron.
> Must we add : 0 * * * * root ?

The simpler solution might be to create a link in the /etc/cron.hourly
directory, like 'sudo ln -s /usr/bin/nssbackup /etc/cron.hourly'.

> ps : sorry for my low level in english but i do my best

No problem, all native speakers we can't be ;-)

Groetjes,

Anton.

lastico (jojo-lastico) said : #9

thanks for your rapid answer,

>The simpler solution might be to create a link in the /etc/cron.hourly
>directory, like 'sudo ln -s /usr/bin/nssbackup /etc/cron.hourly'.

yes in this case i should use à link (you agree), but my question is : when we want to program a backup at 23h 10 every day for example. If we add a basical link, the backup will be done every hour but not at 23h10. How can i add the hour, the personalised contab's parameter ?

I must find an easy solution to solve this problem because the program will be used by inexperienced people and the more is simple the less there will have error.

jonathan

Anton (feenstra) said : #10

lastico wrote:
> Question #62814 on NSsbackup changed:
> https://answers.launchpad.net/nssbackup/+question/62814
>
> lastico proposed the following answer:
> thanks for your rapid answer,
>
>> The simpler solution might be to create a link in the /etc/cron.hourly
>> directory, like 'sudo ln -s /usr/bin/nssbackup /etc/cron.hourly'.
>
> yes in this case i should use à link (you agree), but my question is :
> when we want to program a backup at 23h 10 every day for example. If we
> add a basical link, the backup will be done every hour but not at 23h10.
> How can i add the hour, the personalised contab's parameter ?
>
> I must find an easy solution to solve this problem because the program
> will be used by inexperienced people and the more is simple the less
> there will have error.

You can (should be able to) set this from the nssbackup gui, if you run
as root (gksudo or sudo).

Otherwise, there are graphical (user) crontab editors.

--
Groetjes,

Anton
  _____________ _______________________________________________________
| | |
| _ _ ___,| K. Anton Feenstra |
| / \ / \'| | | IBIVU/Bioinformatics - Free University Amsterdam |
|( | )| | | De Boelelaan 1083A - 1081 HV Amsterdam - Netherlands |
| \_/ \_/ | | | Tel +31 20 59 87783 - Fax +31 20 59 87653 - Room P136 |
| | <email address hidden> - www.few.vu.nl/~feenstra/ |
| | "I'm Looking for a New Simulation" (Stone Temple |
| | Pilots) |
|_____________|_______________________________________________________|

Anton (feenstra) said : #11

lastico wrote:
> Question #62814 on NSsbackup changed:
> https://answers.launchpad.net/nssbackup/+question/62814
>
> lastico proposed the following answer:
> thanks for your rapid answer,
>
>> The simpler solution might be to create a link in the /etc/cron.hourly
>> directory, like 'sudo ln -s /usr/bin/nssbackup /etc/cron.hourly'.
>
> yes in this case i should use à link (you agree), but my question is :
> when we want to program a backup at 23h 10 every day for example. If we
> add a basical link, the backup will be done every hour but not at 23h10.
> How can i add the hour, the personalised contab's parameter ?
>
> I must find an easy solution to solve this problem because the program
> will be used by inexperienced people and the more is simple the less
> there will have error.

You can (should be able to) set this from the nssbackup gui, if you run
as root (gksudo or sudo).

Otherwise, there are graphical (user) crontab editors.

--
Groetjes,

Anton
  _____________ _______________________________________________________
| | |
| _ _ ___,| K. Anton Feenstra |
| / \ / \'| | | IBIVU/Bioinformatics - Free University Amsterdam |
|( | )| | | De Boelelaan 1083A - 1081 HV Amsterdam - Netherlands |
| \_/ \_/ | | | Tel +31 20 59 87783 - Fax +31 20 59 87653 - Room P136 |
| | <email address hidden> - www.few.vu.nl/~feenstra/ |
| | "I'm Looking for a New Simulation" (Stone Temple |
| | Pilots) |
|_____________|_______________________________________________________|

lastico (jojo-lastico) said : #12

>You can (should be able to) set this from the nssbackup gui, if you run
>as root (gksudo or sudo).

yes i know and this what i used up to now. But the problem is : the path used is /usr/share/nssbackup (whereas it should be /usr/share/nssbackup/nssbackup) in the file /etc/cron/nssbackup (where the crontab's parameter are set).

>Otherwise, there are graphical (user) crontab editors.
This is the solution i am trying to setup.

Thanks for your help.

jonathan

lastico (jojo-lastico) said : #13

Sorry for the double post.

I understand your solution. In fact i used the option "précisement à" so the file was created in /etc/crond.d with the corn's parameter. If i use the option "simplement" a link is created as you "predicted". To conclude i agree with your soltuion in this case.

If it could help some people :
http://toto.lastico.free.fr/nssbackup/nssbackup%20planification.pdf
 (sorry but in french or quite )

Once more time : thanks for your help

Jonathan

lastico (jojo-lastico) said : #14

To solve the problem, I get the source of nssbackup and i modified them. Now the target of the link is /usr/local/share/nssbackup/nssbakup. You can modify this parameter in /usr/local/lib/python2.5/site-packages/nssbackup/managers/ConfigManager in the section "writeSchedule"

Think to install the packet : exim4

You can install by this packet : http://toto.lastico.free.fr/nssbackup/nssbackup-0.2-0.orig.tar.gz

hopping it could help

jonathan

Martin Th. Fei (nimoth) said : #15

It still does not work. I tried several ways of setting the time using the GUI (daily simple, daily precise, custom). Also, after setting a time, the next time I load the tab, "custom" is selected and the time is shown in the manual cron line (at least the correct time is shown now). I also tried using a profile to see if that works - no success. Ssbackup won't do any scheduled backups at all.

Any idea?

lastico (jojo-lastico) said : #16

To solve this problem i added a line with crontab -e

Can you help with this problem?

Provide an answer of your own, or ask ablu for more information if necessary.

To post a message you must log in.