Comments (7)
Hey thanks for reporting this!
This was introduced recently in #115
I currently am not able to look in to this. Maybe @nettnikl would have time to take a look possible? :)
from restic-automatic-backup-scheduler.
Sure thing! Might be caused by an empty array being used where we want nothing at all? @georgioghazzi could you put in the following right before the restic forget call?
/tmp/t.sh "${extra_args[@]}"
And execute the following:
echo 'echo "args"; for arg in "$@"; do echo "> $arg"; done; echo "args/"' > /tmp/t.sh
chmod u+x /tmp/t.sh
Then check the diffs with an empty extra_args and one with some dummy arg?
from restic-automatic-backup-scheduler.
Sorry for the late reply.
I've added /tmp/t.sh right before restic forget and i got the same result.
Result Before adding /tmp/t.sh "${extra_args[@]}"
/tmp/t.sh "${extra_args[@]}" added
Result After Adding /tmp/t.sh "${extra_args[@]}"
Results Without "${extra_args[@]}" variable in forget
from restic-automatic-backup-scheduler.
Thanks for your reply! Yeah i just meant to verify the issue - the extra args array is expanded to to " " when empty instead of to nothing. This seems to cause the restic commands to fail in case of positional arguments...
I'll have to think and try a bit more around how to fix.
from restic-automatic-backup-scheduler.
I moved the location of the ${extra_args} to the end of the forget command, but that did not solve the issue.
Thanks for your script btw 👍 🥇 !
from restic-automatic-backup-scheduler.
Okay, so from my tests it seems the only way is to remove the quotes... as with the read command we already took care of input validation etc. (please confirm or explain @erikw if possible) - we maybe could leave them out here?
from restic-automatic-backup-scheduler.
I took the decision to revert #115 with 2873f6a because I don't have time to look at a fix for this right now, and the change as not included in a new release yet.
I'm open to add the functionality of #115 again, if it works out of the box without this bug :)
from restic-automatic-backup-scheduler.
Related Issues (20)
- Systemd unit need both Requires and After for nm-unmetered-connection to work HOT 1
- plist Being Overwritten by Brew HOT 1
- Run backup as restic user HOT 2
- Mac OS LaunchAgent HOT 2
- How to allow user unmount? HOT 1
- Revise non-optional settings HOT 1
- Allow space in extra args HOT 4
- Install fails on windows, pwsh not found HOT 4
- Improve resilience of systemd-backup task HOT 2
- Install fails on windows, pwsh not found HOT 6
- restic_backup.sh backs up supplied paths, but also the folder it's being executed from HOT 13
- Undefined method 'plist_startup' on running service HOT 3
- Support overriding `--group-by` args via env var/config HOT 1
- How to use with minio HOT 1
- `RESTIC_RETENTION_HOURS` is missing from `default.env.sh` file (homebrew macOS)
- Installation error on Windows 2012 R2
- Unable to source in current shell `sudo: source: command not found` HOT 10
- line 77: extra_args[@]: unbound variable HOT 7
- Run a backup on demand? Storage backends other than Backblaze? HOT 3
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 restic-automatic-backup-scheduler.