Comments (1)
I've built a custom image based on cupcakearmy/autorestic:1.7.9 and only added docker-cli via apk. This was enough to come one step further. Autorestic now could find the volume and started a docker run command.
Unfortunately, this also failed without error message. At least it printed the command and I was able, by running it manually, to find out that apparently it did not run restic init before running restic backup. I'm not sure if that's an configuration issue on my side or Autorestic bug. Do I have to run restic init or autorestic check manually (initially) when using cron?
Running init manually solved it an now Autorestic seems to run trough fine.
Though I am not sure if there should be output after "Executing...forget"
Using config: /etc/autorestic/.autorestic.yml
Using env: /etc/autorestic/.autorestic.env
Using lock: /etc/autorestic/.autorestic.lock.yml
Backing up location "dummy"
Running hooks
> echo "Before"
> Executing: /bin/bash -c echo "Before"
Before
Backend: local
> Executing: /usr/bin/docker volume inspect autorestic_dummy-location
[
{
"CreatedAt": "2023-10-29T01:19:43-04:00",
"Driver": "local",
"Labels": {
"com.docker.stack.namespace": "autorestic"
},
"Mountpoint": "/var/lib/docker/165536.165536/volumes/autorestic_dummy-location/_data",
"Name": "autorestic_dummy-location",
"Options": {},
"Scope": "local"
}
]
> Executing: /usr/bin/docker run --rm --entrypoint ash --workdir /data --volume autorestic_dummy-location:/data --hostname docker --volume /backends/local:/repo --env RESTIC_REPOSITORY=/repo --env RESTIC_PASSWORD=topsecret cupcakearmy/autorestic:1.7.9 -c restic backup --tag ar:cron --tag ar:location:dummy /data
Running hooks
> echo "After"
> Executing: /bin/bash -c echo "After"
After
Running hooks
> echo "Something went wrong"
> Executing: /bin/bash -c echo "Something went wrong"
Something went wrong
root@xxx:/# /usr/bin/docker run --rm --entrypoint ash --workdir /data --volume autorestic_dummy-location:/data --hostname docker --volume /backends/local:/repo --env RESTIC_REPOSITORY=/repo --env RESTIC_PASSWORD=topsecret cupcakearmy/autorestic:1.7.9 -c "restic backup --tag ar:cron --tag ar:location:dummy /data"
Fatal: unable to open config file: stat /repo/config: no such file or directory
Is there a repository at the following location?
/repo
root@xxx:/# /usr/bin/docker run --rm --entrypoint ash --workdir /data --volume autorestic_dummy-location:/data --hostname docker --volume /backends/local:/repo --env RESTIC_REPOSITORY=/repo --env RESTIC_PASSWORD=topsecret cupcakearmy/autorestic:1.7.9 -c "restic init"
created restic repository b83abed212 at /repo
Please note that knowledge of your password is required to access
the repository. Losing your password means that your data is
irrecoverably lost.
root@xxx:/# /usr/bin/docker run --rm --entrypoint ash --workdir /data --volume autorestic_dummy-location:/data --hostname docker --volume /backends/local:/repo --env RESTIC_REPOSITORY=/repo --env RESTIC_PASSWORD=topsecret cupcakearmy/autorestic:1.7.9 -c "restic backup --tag ar:cron --tag ar:location:dummy /data"
no parent snapshot found, will read all files
Files: 2 new, 0 changed, 0 unmodified
Dirs: 1 new, 0 changed, 0 unmodified
Added to the repository: 846 B (564 B stored)
processed 2 files, 0 B in 0:00
snapshot eb58e720 saved
Using config: /etc/autorestic/.autorestic.yml
Using env: /etc/autorestic/.autorestic.env
Using lock: /etc/autorestic/.autorestic.lock.yml
Backing up location "dummy"
Running hooks
> echo "Before"
> Executing: /bin/bash -c echo "Before"
Before
Backend: local
> Executing: /usr/bin/docker volume inspect autorestic_dummy-location
[
{
"CreatedAt": "2023-10-29T01:19:43-04:00",
"Driver": "local",
"Labels": {
"com.docker.stack.namespace": "autorestic"
},
"Mountpoint": "/var/lib/docker/165536.165536/volumes/autorestic_dummy-location/_data",
"Name": "autorestic_dummy-location",
"Options": {},
"Scope": "local"
}
]
> Executing: /usr/bin/docker run --rm --entrypoint ash --workdir /data --volume autorestic_dummy-location:/data --hostname docker --volume /backends/local:/repo --env RESTIC_PASSWORD=topsecret --env RESTIC_REPOSITORY=/repo cupcakearmy/autorestic:1.7.9 -c restic backup --tag ar:cron --tag ar:location:dummy /data
Running hooks
> echo "After"
> Executing: /bin/bash -c echo "After"
After
Running hooks
> echo "Well done!"
> Executing: /bin/bash -c echo "Well done!"
Well done!
Forgetting for location "dummy"
For backend "local"
> Executing: /usr/bin/restic --cache-dir /cache forget --tag ar:location:dummy --prune --keep-daily 30 --keep-weekly 52
from autorestic.
Related Issues (20)
- Suggestion: Validate location after executing before hooks HOT 2
- `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
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.