Comments (8)
Thanks ❤️
Mhh ok that is interesting... is there something in /var/log/autorestic.log
?
The config files look fine to me.
from autorestic.
Shows exactly the same as the output from autorestic -c /root/.autorestic.yml cron
the only thing that changes every day is the day itself, so if today it gives this: Skipping. Scheduled for: Sat Nov 14 2020 00:00:00 GMT+0000
tomorrow it will show this Skipping. Scheduled for: Sat Nov 15 2020 00:00:00 GMT+0000
Could it be something related to using 0 0 * * *
as the cron value?
from autorestic.
Mhh that is kind of weird.. I'll see tomorrow if i can manage to replicate somenthing like that and look at the code.
from autorestic.
Hello, I'm going to add something interesting I found... So I've changed the hour to 3AM and now I got this (from autorestic.log):
Running cron jobs
files ▶ Skipping. Scheduled for: Tue Nov 17 2020 03:00:00 GMT+0000
Finished! 🎉
Configuring Backends
Running cron jobs <- looks like it's running the cron job?
Finished! 🎉
Configuring Backends
Running cron jobs
files ▶ Skipping. Scheduled for: Wed Nov 18 2020 03:00:00 GMT+0000
Finished! 🎉
However when I check the snapshots, I only see 2, which are the ones I created manually 🤔
root@matchbox:~# autorestic exec -a snapshots
sftp:
ID Time Host Tags Paths
-----------------------------------------------------------------
0e55331e 2020-10-19 08:00:58 matchbox /src/media
c4d45bc4 2020-11-13 11:49:20 matchbox /src/media
-----------------------------------------------------------------
2 snapshots
I think it may be related to SFTP connection via cron? I'm going to make some trial and error, if I find something else I'll post it as a comment
from autorestic.
I made a simple cron test connecting to the SFTP server, looks like it could be related to autorestic not finding sftp executable!
Subject: Cron <root@matchbox> sftp my-sftp.server.com <<EOF mkdir test bye EOF
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Cron-Env: <PATH=/usr/local/sbin:/usr/local/bin>
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <LOGNAME=root>
Message-Id: <20201117101101.582FE16140C@matchbox>
Date: Tue, 17 Nov 2020 10:11:01 +0000 (UTC)
X-IMAPbase: 1605607935 3
Status: O
X-UID: 2
/bin/sh: 1: sftp: not found <- here
I've added the sftp path to the cron file so now it looks like this:
PATH="/usr/local/sbin:/usr/local/bin:/usr/bin" <- usr/bin added
*/10 * * * * autorestic -c /root/.autorestic.yml cron >> /var/log/autorestic.log 2>&1
If this works out I'll close the issue.
However, maybe adding a fail check or a warning if the sftp executable or similar is not found would be nice
from autorestic.
Looks like the SFTP executable was the issue. I've changed the cron jobs to execute every 10 minutes to test it and it works:
root@matchbox:~# autorestic exec -a snapshots
sftp:
ID Time Host Tags Paths
-----------------------------------------------------------------
0e55331e 2020-10-19 08:00:58 matchbox /src/media
c4d45bc4 2020-11-13 11:49:20 matchbox /src/media
cf8a0ff4 2020-11-17 10:50:02 matchbox /src/media
-----------------------------------------------------------------
3 snapshots
root@matchbox:~# date
Tue Nov 17 10:54:51 UTC 2020
I'll close the issue, maybe a check on autorestic itself if any location executable is not found would be nice to have
from autorestic.
Very interesting!
SFTP it restic internal not autorstic. But I'll add it into the docs.
Thanks for the info :)
from autorestic.
Nvm, it's actually already in the docs :) https://autorestic.vercel.app/location/cron#code3-l2
from autorestic.
Related Issues (20)
- `install` and `upgrade`: allow specifying destdir
- Info command prints out secret keys
- Hooks to have access to location path HOT 1
- Cron updates timestamp even when backup fails
- `uninstall` command is broken
- Docker compose example in the docker installation guide
- 'locations[storage]' has invalid keys: forgetoption HOT 4
- Keep up with restic releases HOT 1
- Restic repository not initialized by default in GCP
- Bug: Docker volume backup to B2 fails ("context deadline exceeded") HOT 1
- forget dryRun is always false on backup task
- Support backing up Docker volumes via the REST backend
- autorestic running backup.yml,restic print 'unknown flag: --use-fs-snapshot' HOT 1
- Copy a repo
- Add a cron option to the forget/prune policies
- Suggestion: don't require 'from' key in locations that use include arguments.
- $PATH being ignored by autorestic HOT 4
- Showing during the backup the progress in percentage of every single location
- Add more verbose error messages HOT 4
- Flag locations as paused
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autorestic.