• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

crontab -e not running backup tasks.

Scheduled Pinned Locked Moved Unsolved
Linux Problems
3
7
2.2k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I
    irishfoguser
    last edited by irishfoguser Dec 21, 2016, 10:32 AM Dec 21, 2016, 4:29 PM

    I am trying to setup a task to backup \images\ to a usb drive but i cant get it to work.

    I am using a program called grysnc and i have setup a task called images to do the backing up. it works grsync program.

    i have setup a crontab as follows but using the command crontab -e i am using Unbuntu 14.04

    00 02 * * 0-6 grsync -e images
    that doesnt work

    I tried adding in some logging, bu t that doesnt work either.
    00 02 * * 0-6 grsync -e images >> /home/myusername/logs/backup.log 2>&1

    Thanks and Happy christmas all.

    1 Reply Last reply Reply Quote 0
    • T
      Tom Elliott
      last edited by Dec 21, 2016, 4:31 PM

      your crontab should be:

      00 02 * * * grsync -e /images >>/home/myusername/logs/backup.log 2>&1

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

      1 Reply Last reply Reply Quote 1
      • T
        Tom Elliott
        last edited by Dec 21, 2016, 4:32 PM

        Also, 0-6 on the DOW is the same as Everyday so you can literally just run * for that field.

        0 is the same as 00 and 02 is the same as 2 so you can literally use:

        0 2 * * * for the crontab itself.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 0
        • I
          irishfoguser
          last edited by Dec 21, 2016, 4:52 PM

          Thanks tom. made the suggested changes and ill see what happens tonight.

          1 Reply Last reply Reply Quote 0
          • T
            Tom Elliott
            last edited by Dec 21, 2016, 4:55 PM

            Your backup task is named images?

            What’s the actual backup task look like?

            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            I 1 Reply Last reply Dec 21, 2016, 5:28 PM Reply Quote 0
            • I
              irishfoguser @Tom Elliott
              last edited by irishfoguser Dec 21, 2016, 11:28 AM Dec 21, 2016, 5:28 PM

              @Tom-Elliott rsync -r -n -p -o -g -v --progress --delete --ignore-existing -i -s /images/ /media/myusername/5E8D585C1892608A/images

              1 Reply Last reply Reply Quote 0
              • W
                Wayne Workman
                last edited by Dec 22, 2016, 12:33 AM

                You have to path to the executable or include PATH in the crontab itself.

                so if you ran command -v grsync it would give you the full path, you’d use this full path instead of just grsync. Or you could just stick the path at the top of the crontab file. echo $PATH and then take the output and put it into line 1 of the crontab as a variable like PATH="put the path output here"

                Read through this, they may make better sense than me. Plus I’m tired. http://stackoverflow.com/questions/2388087/how-to-get-cron-to-call-in-the-correct-paths

                Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                Daily Clean Installation Results:
                https://fogtesting.fogproject.us/
                FOG Reporting:
                https://fog-external-reporting-results.fogproject.us/

                1 Reply Last reply Reply Quote 1
                • 1 / 1
                1 / 1
                • First post
                  5/7
                  Last post

                162

                Online

                12.0k

                Users

                17.3k

                Topics

                155.2k

                Posts
                Copyright © 2012-2024 FOG Project