Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does not create systemd timer #164

Open
Marx1st opened this issue Dec 10, 2024 · 1 comment
Open

does not create systemd timer #164

Marx1st opened this issue Dec 10, 2024 · 1 comment

Comments

@Marx1st
Copy link

Marx1st commented Dec 10, 2024

I've deployed borg and borgmatic on an Ubuntu 22.04 client with this playbook:

- hosts: all
  roles:
  - role: borgbase.ansible_role_borgbackup
    borg_encryption_passphrase:
    borg_repository: ssh://root@xxxx.xxxx.com/opt/borg_backup
    borgmatic_timer: systemd
    borg_user: "backupuser"
    borg_group: "backupuser"
    borg_source_directories:
      - /etc
    borg_retention_policy:
      keep_daily: 7
      keep_weekly: 4
      keep_monthly: 6

The deployment is successfull and I can start a backup with borgmatic manually, but there are no systemd entries:

su backupuser -c borgmatic
Di 10. Dez 16:06:34 CET 2024 - Starting backup.
Di 10. Dez 16:06:36 CET 2024 - Finished backup.

summary:
/etc/borgmatic/config.yaml: Configuration sections (like location:, storage:, retention:, consistency:, and hooks:) are deprecated and support will be removed from a future release. To prepare for this, move your options out of sections to the global scope.
/etc/borgmatic/config.yaml: The exclude_if_present option now expects a list value. String values for this option are deprecated and support will be removed from a future release.
/etc/borgmatic/config.yaml: The repositories option now expects a list of key/value pairs. Lists of strings for this option are deprecated and support will be removed from a future release.
# systemctl --type=timer --all
  UNIT                           LOAD      ACTIVE   SUB     DESCRIPTION
  apport-autoreport.timer        loaded    inactive dead    Process error reports when automatic reporting is enabled (timer based)
  apt-daily-upgrade.timer        loaded    active   waiting Daily apt upgrade and clean activities
  apt-daily.timer                loaded    active   waiting Daily apt download activities
  dpkg-db-backup.timer           loaded    active   waiting Daily dpkg database backup timer
  e2scrub_all.timer              loaded    active   waiting Periodic ext4 Online Metadata Check for All Filesystems
  exim4-base.timer               loaded    active   waiting Daily exim4-base housekeeping
  fstrim.timer                   loaded    active   waiting Discard unused blocks once a week
  fwupd-refresh.timer            loaded    active   waiting Refresh fwupd metadata regularly
  logrotate.timer                loaded    active   waiting Daily rotation of log files
  man-db.timer                   loaded    active   waiting Daily man-db regeneration
  motd-news.timer                loaded    active   waiting Message of the Day
  plocate-updatedb.timer         loaded    active   waiting Update the plocate database daily
● snap-repair.timer              not-found inactive dead    snap-repair.timer
● snapd.refresh.timer            not-found inactive dead    snapd.refresh.timer
  snapd.snap-repair.timer        loaded    inactive dead    Timer to automatically fetch and run repair assertions
  systemd-tmpfiles-clean.timer   loaded    active   waiting Daily Cleanup of Temporary Directories
  ua-timer.timer                 loaded    active   waiting Ubuntu Pro Timer for running repeated jobs
  update-notifier-download.timer loaded    active   waiting Download data for packages that failed at package install time
  update-notifier-motd.timer     loaded    active   waiting Check to see whether there is a new version of Ubuntu available
@user171
Copy link

user171 commented Dec 13, 2024

Same thing for me.
In my case though, the timer does exist but is not enabled by default. I have to systemctl enable --now borgmatic.timer.

I think it is due to this :

# If the role is running and the repo is not yet initialized, an error will occur.

But I'm not sure yet if that does disable my timers on further runs. I have found timers that I had enabled manually that were in a disabled state after running the playbooks again. I have to investigate if this is caused by this.
EDIT: I have just tried the playbook again and the timer is still enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants