FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
  1. May 24, 2024
    • Dr Catherine Pitt's avatar
      Add -q flag to psql calls to suppress 'INSERT 0 1' etc · 59d01a57
      Dr Catherine Pitt authored
      Closes #6
      
      When running psql commands to insert rows in the database, psql normally
      returns an message about what it did, eg "INSERT 0 1" if it inserted a
      row. This can be suppressed with -q . Several of the scripts use psql
      commands to get primary keys from the database, inserting the row if
      necessary. This can lead to the host id variable in the script being set
      to 'INSERT 0 1 <thehostid>' which causes problems when this variable is
      used in other SQL commands.
      
      This always used to work; I suspect the thing that changed is our
      upgrading to Postgres 16 on the backup servers, but I'm struggling to
      see how as Postgres 13 seems to behave the same for me.
      1.0.2
      59d01a57
  2. Oct 23, 2023
    • Dr Adam Thorn's avatar
      don't mark hosts as disabled at the point they get created · 594be148
      Dr Adam Thorn authored
      I think the intention here was perhaps:
      
      - create new host, marked as disabled
      - finish setting up backups
      - once done, mark host as enabled
      
      ...except the script runs as "set -e", so if something goes wrong
      we just never get as far as enabling the host, which means not only
      do no backups run but no failure reports get sent to xymon so we
      don't even notice the failure. This is not good.
      
      Given the entry of a row in the `host` table doesn't do much in and
      of itself, I see no reason why we shouldn't just mark the host as
      initially enabled. We won't try to actually perform a backup until
      a `backup_task` has been created. Perhaps this leads to a brief
      transient behaviour where xymon reports a backup as failing whilst
      the script is still running - but OTOH the xymon report for a new
      machine will always be red for "a while" until the first backup
      has actually run OK.
      594be148
    • Dr Adam Thorn's avatar
      don't bail (due to set -e) if ssh-keyscan fails · 20de2933
      Dr Adam Thorn authored
      We don't need to record the ssh host key in most cases given that we
      generally deploy signed ssh host keys, but I suspect we might have the
      occasional backup target where that doesn't apply (e.g. clusters?)
      
      Regardless, if we can't scan the host key the right behaviour is for
      the script to continue on and set up the backup. If the backup then
      fails due to the absent host key, we will be alerted and take suitable
      action. Right now, the failure mechanism is that we silently don't finish
      setting up the backup, the backup never gets enabled, and we don't
      realise we don't have a backup - eek.
      20de2933
  3. Jul 27, 2023
  4. Nov 17, 2021
  5. Jun 18, 2021
  6. Jun 08, 2021
  7. Apr 07, 2020
  8. Jul 30, 2019
  9. Apr 23, 2019
    • Dr Catherine Pitt's avatar
      new-backup-rsnapshot better support for postgres backups · 6f4dfa12
      Dr Catherine Pitt authored
      The new-backup-rsnapshot script understands a 'postgres' argument, but
      this set up a postgres backup in an old style that we no longer use.
      This change updates it to do some of the work of setting up a new style
      postgres backup and tell the user what else they might need to edit to
      make it go; it varies quite a lot depending on server.
      0.9-ch61
      6f4dfa12
  10. Jan 12, 2017
  11. Sep 07, 2016
  12. Jan 14, 2016
  13. Dec 15, 2015
  14. Jul 02, 2015
Loading