I am having errors while running duplicity in macOS (crontab)
The duplicity command is as follows (works in Command-line)
/usr/local/bin/duplicity /Users/myname/go file:///Volumes/EVO840\ -\ IMPORTANT/DuplicityGo/ --exclude '**/bin/***' --exclude '**/pkg'
When using crontab -e
(with and without sudo),
* * * * * /Users/myname/bashscripts/duplicity.sh > /Users/myname/bashscripts/duplicity.log 2>&1
it returns following error
Traceback (innermost last):
File "/usr/local/bin/duplicity", line 87, in <module>
with_tempdir(main)
File "/usr/local/bin/duplicity", line 72, in with_tempdir
tempdir.default().cleanup()
File "/usr/local/Cellar/duplicity/0.8.23/libexec/lib/python3.9/site-packages/duplicity/tempdir.py", line 69, in default
_defaultInstance = TemporaryDirectory(temproot=config.temproot)
File "/usr/local/Cellar/duplicity/0.8.23/libexec/lib/python3.9/site-packages/duplicity/tempdir.py", line 155, in __init__
temproot = subprocess.check_output([u'getconf', u'DARWIN_USER_TEMP_DIR'])
File "/usr/local/Cellar/python@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/local/Cellar/python@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 505, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/local/Cellar/python@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/local/Cellar/python@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 1821, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'getconf'
Attempt of list Nr. 1 failed. PermissionError: Operation not permitted
Attempt of list Nr. 3 failed. PermissionError: Operation not permitted
Attempt of list Nr. 4 failed. PermissionError: Operation not permitted