Void Linux 5.8.18_1, restic-0.11.0_1, autorestic 0.26, XFCE
Hello, I'd like to start saying autorestic is an amazing tool!
But since I've set up my autorestic.yml file I get this message every now and then when I try to run this command on terminal:
$ autorestic backup -a
An instance of autorestic is already running for this config file
Running the same command a second time just works!
I've set up and anacron job to run autorestic but sometimes I get this output in my log file as well (anacron runs nearly 45 min after my PC boots, there is no autorestic instance running), and snapshots are not created the days I get this message, so it won't run at all.
Here is my autorestic.yml:
locations:
sampacloud:
from: /home/user/cloud/
to: cloud-b2
hooks:
before: notify-send "Backup of cloud has started"
after: notify-send "Backup of cloud has finished"
backends:
cloud-b2:
type: b2
path: cloud-b2
key: >-
key
B2_ACCOUNT_ID: id
B2_ACCOUNT_KEY: key
Here is the job on my anacrontab:
# /etc/anacrontab: configuration file for anacron
# See anacron(8) and anacrontab(5) for details.
SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
# the maximal random delay added to the base delay of the jobs
RANDOM_DELAY=45
# the jobs will be started during the following hours only
START_HOURS_RANGE=3-22
#period in days delay in minutes job-identifier command
1 5 cron.daily nice run-parts /etc/cron.daily
7 25 cron.weekly nice run-parts /etc/cron.weekly
@monthly 45 cron.monthly nice run-parts /etc/cron.monthly
1 30 b.sc.2.b2 /usr/bin/autorestic -c /home/user/.autorestic.yml --ci backup -a 2>&1 | moreutils_ts >> /home/user/autorestic.log
Also, as you can see, I've tried to setup notifications for the start and the end of the backup, I get the notifications when I run the command on my terminal, but not with anacron (when the backup actually works), I know it's not autorestic fault but I would gladly accept some light over this issue.
Thank you!