Git Product home page Git Product logo

Comments (4)

nettnikl avatar nettnikl commented on August 24, 2024

For reference: this is the relevant part of the config env:

export RESTIC_BACKUP_EXTRA_ARGS="--option sftp.command='ssh\ -F\ /etc/restic/ssh_config\ restic-backup-host\ -s\ sftp'"
export RESTIC_BACKUP_EXTRA_ARGS="$RESTIC_BACKUP_EXTRA_ARGS --exclude-caches"
export RESTIC_BACKUP_EXTRA_ARGS="$RESTIC_BACKUP_EXTRA_ARGS --one-file-system"

from restic-automatic-backup-scheduler.

nettnikl avatar nettnikl commented on August 24, 2024

In https://stackoverflow.com/a/27297061/7343513 there is the following said:

... uses the <<< operator, which only takes a single word, so read gets a single whitespace-separated string and splits it into a list of-separated, so that an argument containing whitespace is split into multiple array elements.

Which is exactly what happens here.

$ cmdArgs=( "$@" )
$ printf "%s\n" "${cmdArgs[@]}"
foo bar
baz

is suggested. What do you think?

from restic-automatic-backup-scheduler.

erikw avatar erikw commented on August 24, 2024

@nettnikl could you please try this PR #112 and see if that works for you?

$ cd restic-automatic-backup-scheduler
$ git fetch
$ git switch allow-escaped-spaces

from restic-automatic-backup-scheduler.

nettnikl avatar nettnikl commented on August 24, 2024

I'm getting subprocess ssh: ssh: Could not resolve hostname restic-backup-host: Name or service not known , however this seems to be caused by restic unlock not getting this arg.

Commenting this out, i'm getting unknown flag: --option sftp.command.

Btw:
The command produced looks fine, and works when executed manually:
restic backup --verbose=3 --one-file-system --tag systemd.timer --option b2.connections=5 --exclude-file /path/exclude --option sftp.command=ssh\ -F\ /etc/restic/ssh_config\ restic-backup-host\ -s\ sftp --exclude-caches --one-file-system .

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.