LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-26-2021, 08:46 AM   #1
nebulein
LQ Newbie
 
Registered: Nov 2009
Location: Germany
Distribution: Slackware
Posts: 21

Rep: Reputation: 0
dirvish cronjob not running?


Hi,

after using FreeBSD for Backup purposes for a couple of years I decided to switch these machines back to Slackware because mounting Windows shares works much better.

I am using dirvish for backups. It is all set and runs if I invoke it manually.

dirvish is basically a perl script that uses rsync.

If I put

Code:
20 23 * * * /usr/local/sbin/dirvish-runall
nothing happens. The output is

Code:
23:20:01 dirvish --vault backup
23:20:01 done
Output code is 1 which means "syntax or usage error". But that's about it,I don't see any other means to debug it.

Does anyone use dirvish on Slackware? I am also open to alternatives.


Ben
 
Old 04-26-2021, 09:37 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,484

Rep: Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556
What about the log files in the dirvish vault? Do they give you any clues?
 
Old 04-26-2021, 12:51 PM   #3
nebulein
LQ Newbie
 
Registered: Nov 2009
Location: Germany
Distribution: Slackware
Posts: 21

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by TenTenths View Post
What about the log files in the dirvish vault? Do they give you any clues?
There is nothing happening in the vault. No directory is being made, no log entry.
 
Old 04-26-2021, 01:01 PM   #4
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,484

Rep: Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556
I assume you've run the init manually?
Code:
dirvish --vault backup --init
Add the following to the end of your cron job and see if anything gets written to that file.
Code:
>> /tmp/dirvish.log
 
Old 04-26-2021, 01:27 PM   #5
Paulo2
Member
 
Registered: Aug 2012
Distribution: Slackware64 15.0 (started with 13.37). Testing -current in a spare partition.
Posts: 935

Rep: Reputation: 527Reputation: 527Reputation: 527Reputation: 527Reputation: 527Reputation: 527
:2cent: Sometimes if a script runs ok in a terminal and not at crontab means that some command isn't in the crontab $PATH.
 
Old 04-27-2021, 03:50 AM   #6
nebulein
LQ Newbie
 
Registered: Nov 2009
Location: Germany
Distribution: Slackware
Posts: 21

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by TenTenths View Post
I assume you've run the init manually?
Code:
dirvish --vault backup --init
Yes, I did.
Quote:
Originally Posted by TenTenths View Post
Add the following to the end of your cron job and see if anything gets written to that file.
Code:
>> /tmp/dirvish.log
I did that. It says
Code:
23:20:01 dirvish --vault backup
23:20:01 done


Quote:
Originally Posted by Paulo2 View Post
:2cent: Sometimes if a script runs ok in a terminal and not at crontab means that some command isn't in the crontab $PATH.
That is in fact strange. If I put something like
Code:
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin
I get
Code:
crond[1269]: failed parsing crontab for user root: PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin
What's wrong here?
 
Old 04-27-2021, 08:01 AM   #7
Paulo2
Member
 
Registered: Aug 2012
Distribution: Slackware64 15.0 (started with 13.37). Testing -current in a spare partition.
Posts: 935

Rep: Reputation: 527Reputation: 527Reputation: 527Reputation: 527Reputation: 527Reputation: 527
The $PATH in cron is PATH=/sbin:/usr/sbin:/bin:/usr/bin.
Take a look at the script, if there is some command in other directory, maybe this is the problem.
 
Old 04-27-2021, 08:41 AM   #8
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,903

Rep: Reputation: 1551Reputation: 1551Reputation: 1551Reputation: 1551Reputation: 1551Reputation: 1551Reputation: 1551Reputation: 1551Reputation: 1551Reputation: 1551Reputation: 1551
Try
Code:
20 23 * * * /bin/env PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin /usr/local/sbin/dirvish-runall
 
Old 04-27-2021, 10:19 AM   #9
nebulein
LQ Newbie
 
Registered: Nov 2009
Location: Germany
Distribution: Slackware
Posts: 21

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Petri Kaukasoina View Post
Try
Code:
20 23 * * * /bin/env PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin /usr/local/sbin/dirvish-runall
That did it! Thank you.
 
  


Reply



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
[SOLVED] Cronjob - Shell Script Not Running rcrosoer Linux - General 5 05-22-2013 07:35 AM
cronjob not running! user1221 Linux - Newbie 6 05-26-2009 05:08 AM
script not running in cronjob dningale Solaris / OpenSolaris 2 08-14-2008 12:27 AM
script expression not running in cronjob dningale Solaris / OpenSolaris 2 08-13-2008 12:04 AM
dirvish as a backup tool yongitz Linux - Software 2 08-09-2006 10:11 AM

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

All times are GMT -5. The time now is 11:31 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