automatic backup with duply to remote computer

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I'd like to make a daily backup from my machine to another. The backup is created via duply, manually triggering it works fine:



$ duply home status
Start duply v1.11.3, time is 2018-11-19 17:07:10.
Using profile '/home/ingo/.duply/home'.
Using installed duplicity version 0.7.11, python 2.7.13, gpg 2.1.18 (Home: /home/ingo/.gnupg), awk 'GNU Awk 4.1.4, API: 1.1 (GNU MPFR 3.1.5, GNU MP 6.1.2)', grep 'grep (GNU grep) 2.27', bash '4.4.12(1)-release (x86_64-pc-linux-gnu)'.
Autoset found secret key of first GPG_KEY entry 'XXXXXXXXXXXX' for signing.
Checking TEMP_DIR '/tmp' is a folder and writable (OK)
Test - Encrypt to 'XXXXXXXXXXXXX' & Sign with 'XXXXXXXXXXXXXX' (OK)
Test - Decrypt (OK)
Test - Compare (OK)
Cleanup - Delete '/tmp/duply.32286.1542643630_*'(OK)

(...)

Import of duplicity.backends.webdavbackend Succeeded
ssh: Connected (version 2.0, client OpenSSH_7.2p2)
ssh: Authentication (publickey) successful!
ssh: [chan 0] Opened sftp connection (server version 3)

(...)

--- Finished state OK at 17:07:40.743 - Runtime 00:00:29.722 ---


Yet when I put that very same command in crontab, it results in an error:



(...)
Import of duplicity.backends.webdavbackend Succeeded
ssh: Connected (version 2.0, client OpenSSH_7.2p2)
Using temporary directory /tmp/duplicity-_dXl2a-tempdir
Backend error detail: Traceback (most recent call last):
File "/usr/bin/duplicity", line 1553, in <module>
with_tempdir(main)
File "/usr/bin/duplicity", line 1547, in with_tempdir
fn()
File "/usr/bin/duplicity", line 1382, in main
action = commandline.ProcessCommandLine(sys.argv[1:])
File "/usr/lib/python2.7/dist-packages/duplicity/commandline.py", line 1126, in ProcessCommandLine
backup, local_pathname = set_backend(args[0], args[1])
File "/usr/lib/python2.7/dist-packages/duplicity/commandline.py", line 1015, in set_backend
globals.backend = backend.get_backend(bend)
File "/usr/lib/python2.7/dist-packages/duplicity/backend.py", line 223, in get_backend
obj = get_backend_object(url_string)
File "/usr/lib/python2.7/dist-packages/duplicity/backend.py", line 209, in get_backend_object
return factory(pu)
File "/usr/lib/python2.7/dist-packages/duplicity/backends/ssh_paramiko_backend.py", line 235, in __init__
self.config['port'], e))
BackendException: ssh connection to planetmaker@archivius.XXXXXXX:5214 failed: Private key file is encrypted

BackendException: ssh connection to planetmaker@archivius.XXXXXXX:5214 failed: Private key file is encrypted
01:05:06.287 Task 'INCR' failed with exit code '23'.
--- Finished state FAILED 'code 23' at 01:05:06.287 - Runtime 00:00:02.953 ---


Well, sure enough, so I created and installed an ssh - key which has password on the remote machine - and removed the other keys, so that there is only that one chance to login to archivius (and I double-checked as of this answer and the 2nd one there, too). But that didn't seem to have any effect on this problem. What am I missing, what do I overlook?



From my personal crontab:



crontab -l
5 1 * * 1-5,7 /usr/bin/duply home incr









share|improve this question























  • The cron initiated process is missing the appropriate environment variables to connect to the gpg and ssh agents.... Something like this
    – RubberStamp
    Nov 19 at 16:35














up vote
0
down vote

favorite












I'd like to make a daily backup from my machine to another. The backup is created via duply, manually triggering it works fine:



$ duply home status
Start duply v1.11.3, time is 2018-11-19 17:07:10.
Using profile '/home/ingo/.duply/home'.
Using installed duplicity version 0.7.11, python 2.7.13, gpg 2.1.18 (Home: /home/ingo/.gnupg), awk 'GNU Awk 4.1.4, API: 1.1 (GNU MPFR 3.1.5, GNU MP 6.1.2)', grep 'grep (GNU grep) 2.27', bash '4.4.12(1)-release (x86_64-pc-linux-gnu)'.
Autoset found secret key of first GPG_KEY entry 'XXXXXXXXXXXX' for signing.
Checking TEMP_DIR '/tmp' is a folder and writable (OK)
Test - Encrypt to 'XXXXXXXXXXXXX' & Sign with 'XXXXXXXXXXXXXX' (OK)
Test - Decrypt (OK)
Test - Compare (OK)
Cleanup - Delete '/tmp/duply.32286.1542643630_*'(OK)

(...)

Import of duplicity.backends.webdavbackend Succeeded
ssh: Connected (version 2.0, client OpenSSH_7.2p2)
ssh: Authentication (publickey) successful!
ssh: [chan 0] Opened sftp connection (server version 3)

(...)

--- Finished state OK at 17:07:40.743 - Runtime 00:00:29.722 ---


Yet when I put that very same command in crontab, it results in an error:



(...)
Import of duplicity.backends.webdavbackend Succeeded
ssh: Connected (version 2.0, client OpenSSH_7.2p2)
Using temporary directory /tmp/duplicity-_dXl2a-tempdir
Backend error detail: Traceback (most recent call last):
File "/usr/bin/duplicity", line 1553, in <module>
with_tempdir(main)
File "/usr/bin/duplicity", line 1547, in with_tempdir
fn()
File "/usr/bin/duplicity", line 1382, in main
action = commandline.ProcessCommandLine(sys.argv[1:])
File "/usr/lib/python2.7/dist-packages/duplicity/commandline.py", line 1126, in ProcessCommandLine
backup, local_pathname = set_backend(args[0], args[1])
File "/usr/lib/python2.7/dist-packages/duplicity/commandline.py", line 1015, in set_backend
globals.backend = backend.get_backend(bend)
File "/usr/lib/python2.7/dist-packages/duplicity/backend.py", line 223, in get_backend
obj = get_backend_object(url_string)
File "/usr/lib/python2.7/dist-packages/duplicity/backend.py", line 209, in get_backend_object
return factory(pu)
File "/usr/lib/python2.7/dist-packages/duplicity/backends/ssh_paramiko_backend.py", line 235, in __init__
self.config['port'], e))
BackendException: ssh connection to planetmaker@archivius.XXXXXXX:5214 failed: Private key file is encrypted

BackendException: ssh connection to planetmaker@archivius.XXXXXXX:5214 failed: Private key file is encrypted
01:05:06.287 Task 'INCR' failed with exit code '23'.
--- Finished state FAILED 'code 23' at 01:05:06.287 - Runtime 00:00:02.953 ---


Well, sure enough, so I created and installed an ssh - key which has password on the remote machine - and removed the other keys, so that there is only that one chance to login to archivius (and I double-checked as of this answer and the 2nd one there, too). But that didn't seem to have any effect on this problem. What am I missing, what do I overlook?



From my personal crontab:



crontab -l
5 1 * * 1-5,7 /usr/bin/duply home incr









share|improve this question























  • The cron initiated process is missing the appropriate environment variables to connect to the gpg and ssh agents.... Something like this
    – RubberStamp
    Nov 19 at 16:35












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'd like to make a daily backup from my machine to another. The backup is created via duply, manually triggering it works fine:



$ duply home status
Start duply v1.11.3, time is 2018-11-19 17:07:10.
Using profile '/home/ingo/.duply/home'.
Using installed duplicity version 0.7.11, python 2.7.13, gpg 2.1.18 (Home: /home/ingo/.gnupg), awk 'GNU Awk 4.1.4, API: 1.1 (GNU MPFR 3.1.5, GNU MP 6.1.2)', grep 'grep (GNU grep) 2.27', bash '4.4.12(1)-release (x86_64-pc-linux-gnu)'.
Autoset found secret key of first GPG_KEY entry 'XXXXXXXXXXXX' for signing.
Checking TEMP_DIR '/tmp' is a folder and writable (OK)
Test - Encrypt to 'XXXXXXXXXXXXX' & Sign with 'XXXXXXXXXXXXXX' (OK)
Test - Decrypt (OK)
Test - Compare (OK)
Cleanup - Delete '/tmp/duply.32286.1542643630_*'(OK)

(...)

Import of duplicity.backends.webdavbackend Succeeded
ssh: Connected (version 2.0, client OpenSSH_7.2p2)
ssh: Authentication (publickey) successful!
ssh: [chan 0] Opened sftp connection (server version 3)

(...)

--- Finished state OK at 17:07:40.743 - Runtime 00:00:29.722 ---


Yet when I put that very same command in crontab, it results in an error:



(...)
Import of duplicity.backends.webdavbackend Succeeded
ssh: Connected (version 2.0, client OpenSSH_7.2p2)
Using temporary directory /tmp/duplicity-_dXl2a-tempdir
Backend error detail: Traceback (most recent call last):
File "/usr/bin/duplicity", line 1553, in <module>
with_tempdir(main)
File "/usr/bin/duplicity", line 1547, in with_tempdir
fn()
File "/usr/bin/duplicity", line 1382, in main
action = commandline.ProcessCommandLine(sys.argv[1:])
File "/usr/lib/python2.7/dist-packages/duplicity/commandline.py", line 1126, in ProcessCommandLine
backup, local_pathname = set_backend(args[0], args[1])
File "/usr/lib/python2.7/dist-packages/duplicity/commandline.py", line 1015, in set_backend
globals.backend = backend.get_backend(bend)
File "/usr/lib/python2.7/dist-packages/duplicity/backend.py", line 223, in get_backend
obj = get_backend_object(url_string)
File "/usr/lib/python2.7/dist-packages/duplicity/backend.py", line 209, in get_backend_object
return factory(pu)
File "/usr/lib/python2.7/dist-packages/duplicity/backends/ssh_paramiko_backend.py", line 235, in __init__
self.config['port'], e))
BackendException: ssh connection to planetmaker@archivius.XXXXXXX:5214 failed: Private key file is encrypted

BackendException: ssh connection to planetmaker@archivius.XXXXXXX:5214 failed: Private key file is encrypted
01:05:06.287 Task 'INCR' failed with exit code '23'.
--- Finished state FAILED 'code 23' at 01:05:06.287 - Runtime 00:00:02.953 ---


Well, sure enough, so I created and installed an ssh - key which has password on the remote machine - and removed the other keys, so that there is only that one chance to login to archivius (and I double-checked as of this answer and the 2nd one there, too). But that didn't seem to have any effect on this problem. What am I missing, what do I overlook?



From my personal crontab:



crontab -l
5 1 * * 1-5,7 /usr/bin/duply home incr









share|improve this question















I'd like to make a daily backup from my machine to another. The backup is created via duply, manually triggering it works fine:



$ duply home status
Start duply v1.11.3, time is 2018-11-19 17:07:10.
Using profile '/home/ingo/.duply/home'.
Using installed duplicity version 0.7.11, python 2.7.13, gpg 2.1.18 (Home: /home/ingo/.gnupg), awk 'GNU Awk 4.1.4, API: 1.1 (GNU MPFR 3.1.5, GNU MP 6.1.2)', grep 'grep (GNU grep) 2.27', bash '4.4.12(1)-release (x86_64-pc-linux-gnu)'.
Autoset found secret key of first GPG_KEY entry 'XXXXXXXXXXXX' for signing.
Checking TEMP_DIR '/tmp' is a folder and writable (OK)
Test - Encrypt to 'XXXXXXXXXXXXX' & Sign with 'XXXXXXXXXXXXXX' (OK)
Test - Decrypt (OK)
Test - Compare (OK)
Cleanup - Delete '/tmp/duply.32286.1542643630_*'(OK)

(...)

Import of duplicity.backends.webdavbackend Succeeded
ssh: Connected (version 2.0, client OpenSSH_7.2p2)
ssh: Authentication (publickey) successful!
ssh: [chan 0] Opened sftp connection (server version 3)

(...)

--- Finished state OK at 17:07:40.743 - Runtime 00:00:29.722 ---


Yet when I put that very same command in crontab, it results in an error:



(...)
Import of duplicity.backends.webdavbackend Succeeded
ssh: Connected (version 2.0, client OpenSSH_7.2p2)
Using temporary directory /tmp/duplicity-_dXl2a-tempdir
Backend error detail: Traceback (most recent call last):
File "/usr/bin/duplicity", line 1553, in <module>
with_tempdir(main)
File "/usr/bin/duplicity", line 1547, in with_tempdir
fn()
File "/usr/bin/duplicity", line 1382, in main
action = commandline.ProcessCommandLine(sys.argv[1:])
File "/usr/lib/python2.7/dist-packages/duplicity/commandline.py", line 1126, in ProcessCommandLine
backup, local_pathname = set_backend(args[0], args[1])
File "/usr/lib/python2.7/dist-packages/duplicity/commandline.py", line 1015, in set_backend
globals.backend = backend.get_backend(bend)
File "/usr/lib/python2.7/dist-packages/duplicity/backend.py", line 223, in get_backend
obj = get_backend_object(url_string)
File "/usr/lib/python2.7/dist-packages/duplicity/backend.py", line 209, in get_backend_object
return factory(pu)
File "/usr/lib/python2.7/dist-packages/duplicity/backends/ssh_paramiko_backend.py", line 235, in __init__
self.config['port'], e))
BackendException: ssh connection to planetmaker@archivius.XXXXXXX:5214 failed: Private key file is encrypted

BackendException: ssh connection to planetmaker@archivius.XXXXXXX:5214 failed: Private key file is encrypted
01:05:06.287 Task 'INCR' failed with exit code '23'.
--- Finished state FAILED 'code 23' at 01:05:06.287 - Runtime 00:00:02.953 ---


Well, sure enough, so I created and installed an ssh - key which has password on the remote machine - and removed the other keys, so that there is only that one chance to login to archivius (and I double-checked as of this answer and the 2nd one there, too). But that didn't seem to have any effect on this problem. What am I missing, what do I overlook?



From my personal crontab:



crontab -l
5 1 * * 1-5,7 /usr/bin/duply home incr






ssh backup duply






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 19 at 20:39









Michael Prokopec

3628




3628










asked Nov 19 at 16:24









planetmaker

25919




25919











  • The cron initiated process is missing the appropriate environment variables to connect to the gpg and ssh agents.... Something like this
    – RubberStamp
    Nov 19 at 16:35
















  • The cron initiated process is missing the appropriate environment variables to connect to the gpg and ssh agents.... Something like this
    – RubberStamp
    Nov 19 at 16:35















The cron initiated process is missing the appropriate environment variables to connect to the gpg and ssh agents.... Something like this
– RubberStamp
Nov 19 at 16:35




The cron initiated process is missing the appropriate environment variables to connect to the gpg and ssh agents.... Something like this
– RubberStamp
Nov 19 at 16:35















active

oldest

votes











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f482798%2fautomatic-backup-with-duply-to-remote-computer%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f482798%2fautomatic-backup-with-duply-to-remote-computer%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown






Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?