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

autorestic cron does not work even when cron settings are defined in global section of the config #425

Open
Kenya-West opened this issue Jan 20, 2025 · 0 comments

Comments

@Kenya-West
Copy link

Kenya-West commented Jan 20, 2025

Describe the bug
Definition of the cron in global section of the config leads to autorestic cron being launched but doing nothing, as I see in log file.

Expected behavior
autorestic cron command should work and do something and there should be log records of command working,

Environment

  • OS: Ubuntu
  • Version: 24.04
  • Autorestic version: 1.8.3

Additional context
I create the following config:

version: 2

extras:
  backup: &backup
    exclude-file: []
  forget: &forget
    keep-last:
      - 10
    forgetoption: prune
  complete_options: &complete_options
    backup:
      <<: *backup

global:
  forget:
    keep-last: 5
    keep-daily: 4
    keep-weekly: 1
    keep-monthly: 12
    keep-yearly: 7

locations:
  home_user:
    from: /home/user
    to:
    - somehost
    options:
      <<: *complete_options
  shared_ssl:
    from: /etc/ssl/shared
    to:
    - somehost
    options:
      <<: *complete_options

backends:
  somehost:
    type: rest
    path: http://sub.example.tld:22002/
    rest:
      user: user
      password: password

- and the following cron job (from sudo):

#Ansible: Autorestic backup
5 * * * * /home/user/backup-restic-node/autorestic/scripts/update-cron-debug.sh
PATH="/usr/local/bin:/usr/bin:/bin"

autorestic -c /home/user/backup-restic-node/autorestic/config/.autorestic.yaml --ci cron > /tmp/autorestic.log 2>&1

as you can see, it writes an output to /tmp/autorestic.log file, but after execution of the command only the following is written there:

$user: ~/ ❯ sudo cat /tmp/autorestic.log
Using config:    /home/user/backup-restic-node/autorestic/config/.autorestic.yaml
Using env:       /home/user/backup-restic-node/autorestic/config/.autorestic.env
Using lock:      /home/user/backup-restic-node/autorestic/config/.autorestic.lock.yml

- and that's it. The actual backup procedure does not happen. What is going on?

I watched for this for 3 days and it did nothing. The manual backup works good.

@Kenya-West Kenya-West changed the title autorestic autorestic cron does not work even when cron settings are defined in global section of the config Jan 20, 2025
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

1 participant