From 94a154c7ca8c349966ae1f1e0554e2676cbe35b8 Mon Sep 17 00:00:00 2001 From: tofran Date: Fri, 13 Nov 2020 22:58:48 +0000 Subject: [PATCH] Remove `--drive-use-trash=false` from rclone param Google drive trash retention policy changed making this no longer a good default a go Issue #3095 --- changelog/unreleased/issue-3095 | 9 +++++++++ doc/030_preparing_a_new_repo.rst | 5 ++--- internal/backend/rclone/config.go | 4 ++-- 3 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 changelog/unreleased/issue-3095 diff --git a/changelog/unreleased/issue-3095 b/changelog/unreleased/issue-3095 new file mode 100644 index 000000000..a15844af5 --- /dev/null +++ b/changelog/unreleased/issue-3095 @@ -0,0 +1,9 @@ +Change: Remove `--drive-use-trash=false` from default rclone params + +By default restic used launched rclone with --drive-use-trash=false, +since google drive trash retention policy changed, it is no longer required. +Rclone will now use what's provided in by the `--drive-use-trash +parameter, `drive-use-trash` config or RCLONE_CONFIG_*_USE_TRASH env +falling back to `true` as a default (as of: v1.53.2). + +https://github.com/restic/restic/issues/3095 \ No newline at end of file diff --git a/doc/030_preparing_a_new_repo.rst b/doc/030_preparing_a_new_repo.rst index e6cd35757..34b792ff3 100644 --- a/doc/030_preparing_a_new_repo.rst +++ b/doc/030_preparing_a_new_repo.rst @@ -601,10 +601,9 @@ For debugging rclone, you can set the environment variable ``RCLONE_VERBOSE=2``. The rclone backend has two additional options: * ``-o rclone.program`` specifies the path to rclone, the default value is just ``rclone`` - * ``-o rclone.args`` allows setting the arguments passed to rclone, by default this is ``serve restic --stdio --b2-hard-delete --drive-use-trash=false`` + * ``-o rclone.args`` allows setting the arguments passed to rclone, by default this is ``serve restic --stdio --b2-hard-delete`` -The reason for the two last parameters (``--b2-hard-delete`` and -``--drive-use-trash=false``) can be found in the corresponding GitHub `issue #1657`_. +The reason for the ``--b2-hard-delete`` parameters can be found in the corresponding GitHub `issue #1657`_. In order to start rclone, restic will build a list of arguments by joining the following lists (in this order): ``rclone.program``, ``rclone.args`` and as the diff --git a/internal/backend/rclone/config.go b/internal/backend/rclone/config.go index 40b0f8905..697a71a6d 100644 --- a/internal/backend/rclone/config.go +++ b/internal/backend/rclone/config.go @@ -10,14 +10,14 @@ import ( // Config contains all configuration necessary to start rclone. type Config struct { Program string `option:"program" help:"path to rclone (default: rclone)"` - Args string `option:"args" help:"arguments for running rclone (default: serve restic --stdio --b2-hard-delete --drive-use-trash=false)"` + Args string `option:"args" help:"arguments for running rclone (default: serve restic --stdio --b2-hard-delete)"` Remote string Connections uint `option:"connections" help:"set a limit for the number of concurrent connections (default: 5)"` } var defaultConfig = Config{ Program: "rclone", - Args: "serve restic --stdio --b2-hard-delete --drive-use-trash=false", + Args: "serve restic --stdio --b2-hard-delete", Connections: 5, }