automatic backup with duply to remote computer
Clash 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
ssh backup duply
add a comment |
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
ssh backup duply
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
add a comment |
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
ssh backup duply
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
ssh backup duply
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
add a comment |
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
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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