Git Product home page Git Product logo

Comments (7)

erikw avatar erikw commented on July 3, 2024 1

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.

nettnikl avatar nettnikl commented on July 3, 2024

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.

ggzica avatar ggzica commented on July 3, 2024

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[@]}"

image

/tmp/t.sh "${extra_args[@]}" added

image

Result After Adding /tmp/t.sh "${extra_args[@]}"

image

Results Without "${extra_args[@]}" variable in forget

image

from restic-automatic-backup-scheduler.

nettnikl avatar nettnikl commented on July 3, 2024

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.

ggzica avatar ggzica commented on July 3, 2024

I moved the location of the ${extra_args} to the end of the forget command, but that did not solve the issue.
image

Thanks for your script btw 👍 🥇 !

from restic-automatic-backup-scheduler.

nettnikl avatar nettnikl commented on July 3, 2024

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.

erikw avatar erikw commented on July 3, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.