Find the answer to your Linux question:
Results 1 to 4 of 4
I am using webmin 1.80 on Mandrake 10.1 to try and schedule a backup of files to an external disk. Disk is there (mounted etc), files are created in the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2005
    Location
    UK London
    Posts
    8

    Webmin backup and cron


    I am using webmin 1.80 on Mandrake 10.1 to try and schedule a backup of files to an external disk.

    Disk is there (mounted etc), files are created in the daily folder for cron (/etc/crondaily) but nothing happens. Log reports for cron show nothing odd.

    The command line that Webmin creates is a simple tar from here to there which works on its own in a shell.......

    Failing webmin making it easy, what is the correct way to schedule a daily tarring of a directory. Should it be diretly in crontab? Or should it be a shell script in the cron daily folder?

    linux is such a time eater........but persevering

    alans

  2. #2
    Linux Guru
    Join Date
    Mar 2003
    Location
    Wisconsin
    Posts
    1,907
    A couple of things to note about cron...

    1) Are you sure you're running it as root?
    2) Are you sure you've used absoulte paths rather then relative. Cron runs all commands from /var/cron (or somewhere abouts there). Even though you might be calling the file from /home/user/backupscripts, it will still run from where cron runs it from, if you know what I mean.

    Those are the two biggest problems I've seen with cron.
    Jeremy
    Registered Linux user #346571
    "All The Dude ever wanted was his rug back" - The Dude

  3. #3
    Just Joined!
    Join Date
    Mar 2005
    Location
    UK London
    Posts
    8

    re:A Couple of things about cron

    Quote Originally Posted by jeremy1701
    A couple of things to note about cron...

    1) Are you sure you're running it as root?
    2) Are you sure you've used absoulte paths rather then relative. Cron runs all commands from /var/cron (or somewhere abouts there). Even though you might be calling the file from /home/user/backupscripts, it will still run from where cron runs it from, if you know what I mean.

    Those are the two biggest problems I've seen with cron.
    Jeremy
    Yes I am running it as root. The perl file created had a path of dot slash (./) but i replaced this with the path to the file as /etc/cronxxxx

    Still the commands were not executed.

    I will rerun tests and recheck and post back

    cheers
    alans

  4. #4
    Just Joined!
    Join Date
    Mar 2005
    Location
    UK London
    Posts
    8

    Cron webmin problem resolved but not fixed

    Well I gave up with webmin as it just didnt seem to work.
    So i wrote my own shell script (all 2 lines!) and dropped it in the cron.hourly folder and bingo! One file backup script working.

    Had to make the shell script executbale by typing chmod +x /path/myscript.sh

    Hopefully this will do.

    alans

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •