Hi
The +_- separators priorities, if any, need to be documented.
For example, running "duply ... cleanup+backup+purge --force", I got:
--- Start running command CLEANUP at 00:35:35.103 ---
BackendException: ssh connection.... [Errno 110] Connection timed out
00:37:37.164 Task 'CLEANUP' failed with exit code '23'.
--- Finished state FAILED 'code 23' at 00:37:37.164 - Runtime 00:02:02.060 ---
--- Skipping command PRE ! ---
--- Start running command BKP at 00:37:37.177 ---
...
It is a bit weird for me that when running cleanup+backup+purge a failure in cleanup would result in "pre" being skiped, but "bkp" being run.
Please improve the documentation:
Looks like cleanup+backup+purge means (cleanup+pre)bkp(post+purge) or (((cleanup+pre)_bkp)_post)+purge) or something similar.
If you intended to support operator priorities, it would make sense to have backup translate into (pre_bkp_post) with these parenthesis. I mean it woud be nice to have cleanup+backup+purge translate into cleanup+(pre_bkp_post)+purge.
Thank you for duply!
On 11.09.2018 12:07, Nirgal Vourgère wrote:
hmm.. you stumbled over a bug there. you are right that currently
cleanup+backup+purgetranslates to
cleanup+pre_bkp_post+purgeinstead of
cleanup+(pre_bkp_post)+purge.
that is an oversight and unfortunately not that easy to fix (no prioritizing, grouping implemented currently). will have a look at it though when time permits.
in the meantime you could work around it by not using the macro and reordering the commands like
pre_cleanup+bkp+purge_postalso
duply profile cleanup && duply profile backup && duply profile purgewill probably work.
be aware that the conditionals are mainly for the pre/post scripts as duplicity tends to return error codes often eg. if it cannot access files (even some not meant to be in the backup) or when some warnings occured.
your welcome.. nice catch! ..ede/duply.net
Related
Feature Requests:
#44Last edit: ede 2018-09-11
hey Nirgal,
would you mind testing if
http://duply.net/wiki/index.php/Duply-code#Latest_Development_Snapshot
works as you'd expect?
cleanup+backup+purgetranslates now tocleanup+[pre_bkp_post]+purgeso the command should be skipped as expected.thanks ..ede/duply.net
Last edit: ede 2018-10-07
released in duply 2.2.. ede/duply.net
Sorry I haven't been able to test that yet, I'm lazilly using Debian stable packages.
However, this is exactly what should have been done. This looks perfect!
Thank you very much. :)