XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Home
    2. pianon
    3. Posts
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 7
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: Creating schedules to run on specific days.

      Yes that makes sense, thank you very much.

      Makes me think managing backups via xo-cli like you proposed would work a lot smoother for multiple XOA instances versus doing it in the gui.

      Is it even mandatory for a Job to also have a schedule attached, if i run it using /etc/crontab?
      i guess i'll figure this one out for myself.

      posted in Xen Orchestra
      pianonP
      pianon
    • RE: Creating schedules to run on specific days.

      Hello and thanks for replying @badrAZ

      Ye i was curious how you implemented the cron schedules in XOA.

      Of course, cron doesn't allow for an and-logic in itself so i wondered if i could prepend some condition to the backup job.

      On systems which allow creating manual entries in cron-files i usually do as i showed the first posting, if i wish for more specificity. (and i suspect you don't edit crontabs in XOA by yourself)

      Again, like this (or whatever your condition might be)

      0 0 1-7 * *  [ $(date +\%u) -eq 7 ] && backup
      

      It would mean, the schedule runs every day of month from 1 to 7, but the backup would only run if the previous statement exits with zero which is when day of week equals to 7.

      is there a way in XOA to configure a job or so to mimic this behaviour?

      posted in Xen Orchestra
      pianonP
      pianon
    • RE: Creating schedules to run on specific days.

      i worked around my problem by creating a delta backup job with a full backup interval, such that the full backup would only run on a sunday every four weeks.

      Still, for backup plans which do not contain incremental backups, this obviously wouldn't work.

      posted in Xen Orchestra
      pianonP
      pianon
    • RE: Creating schedules to run on specific days.

      Works in the GUI the same on each of my 5 XOA servers.

      so i edited the schedule via xo-cli

      [15:10:04][root@mgmt:~]$ xo-cli schedule.set cron="0 18 1-7 * 0" id=4d011d64-cd11-45cd-adf1-995ac44d1411
      

      as i expected the pattern becomes like this

      Sunday, September 13, 2020, 6:00 PM
      Sunday, September 20, 2020, 6:00 PM
      Sunday, September 27, 2020, 6:00 PM
      Thursday, October 1, 2020, 6:00 PM
      Friday, October 2, 2020, 6:00 PM
      Saturday, October 3, 2020, 6:00 PM
      Sunday, October 4, 2020, 6:00 PM
      
      posted in Xen Orchestra
      pianonP
      pianon
    • RE: Creating schedules to run on specific days.

      Thank you.

      I will try the same procedure on another XOA;

      perhaps this behaviour is due to some fault with the one i'm trying to create the schedule on.

      posted in Xen Orchestra
      pianonP
      pianon
    • RE: Creating schedules to run on specific days.

      Thanks for your reply.

      I tried to play around with it, but each time i switch to week days, the schedule loses its patterns for the month days.

      My method was:
      In month day view select day 1 to 7, switch to week day selection and select only sunday.

      But if i switch to week days like described, the pattern becomes like this:

      Sunday, September 13, 2020, 6:00 PM
      Sunday, September 20, 2020, 6:00 PM
      Sunday, September 27, 2020, 6:00 PM

      and so on...

      posted in Xen Orchestra
      pianonP
      pianon
    • Creating schedules to run on specific days.

      Hello,

      i'd like to know if it is possible to configure a schedule to run on, say some specific day of month; for example first sunday of every month.

      i first tried to click something together in the xoa-web gui, but i hadn't any success with this method so i tried editing/creating said schedule via xo-cli - but as far as im concerned you are only allowed to use the cron notation for the schedule rules.

      [14:00:53][root@mgmt:~]$ xo-cli schedule.getAll
      [
        {
          "jobId": "40c62026-9219-4a37-91d3-e41b359d6338",
          "name": "foo",
          "enabled": true,
          "cron": "0 18 1 * *",
          "timezone": "Europe/Berlin",
          "id": "4d011d64-cd11-45cd-adf1-995ac44d1411"
        },
      

      tl;dr: i'd like to create a schedule with this property:

      0 0 1-7 * *  [ $(date +\%u) -eq 7 ] && backup
      

      i there a way to do that?

      posted in Xen Orchestra
      pianonP
      pianon