What is the problem you are having with rclone?
Getting error message
Failed to create file system for "QNap3:UpFlags/": couldn't connect to ssh-agent: SSH agent requested but SSH_AUTH_SOCK not-specified
when running any rclone command against that QNap3: remote in a cron job. WHen run interactively it works fine.
Run the command 'rclone version' and share the full output of the command.
rclone v1.63.1
- os/version: debian bookworm/sid (64 bit)
- os/kernel: 6.4.6-76060406-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.20.6
- go/linking: static
- go/tags: none
Are you on the latest version of rclone? You can validate by checking the version listed here: Rclone downloads
--> Yup!
Which cloud storage system are you using? (eg Google Drive)
A QNap on my LAN, over SFTP
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
It fails for all of these, with the same error:
rclone touch QNap3:UpFlags/dbkups.writing
rclone sync -v /media/david/Seag8/davidbkups/ QNap3:Backups/davidbkups/
rclone delete QNap3:UpFlags/dbkups.writing
rclone --sftp-skip-links size QNap3:Backups/davidbkups/
The rclone config contents with secrets removed.
[QNap3]
type = sftp
host = frier-nas-03.home.arpa
key_file = /home/david/.ssh/[redacted]
key_use_agent = true
shell_type = unix
md5sum_command = md5sum
sha1sum_command = sha1sum
A log from the command with the -vv
flag
When I run the script interactively from the command line, as david
, the sync command produces:
2023/08/27 03:02:56 DEBUG : Setting --transfers "6" from environment variable RCLONE_TRANSFERS="6"
2023/08/27 03:02:56 DEBUG : Setting --check-first "true" from environment variable RCLONE_CHECK_FIRST="true"
2023/08/27 03:02:56 DEBUG : rclone: Version "v1.63.1" starting with parameters ["rclone" "sync" "-vv" "/media/david/Seag8/davidbkups/" "QNap3:Backups/davidbkups/"]
2023/08/27 03:02:56 DEBUG : Creating backend with remote "/media/david/Seag8/davidbkups/"
2023/08/27 03:02:56 DEBUG : Using config file from "/home/david/.config/rclone/rclone.conf"
2023/08/27 03:02:56 DEBUG : fs cache: renaming cache item "/media/david/Seag8/davidbkups/" to be canonical "/media/david/Seag8/davidbkups"
2023/08/27 03:02:56 DEBUG : Creating backend with remote "QNap3:Backups/davidbkups/"
2023/08/27 03:02:56 DEBUG : sftp://david@frier-nas-03.home.arpa:22/Backups/davidbkups/: New connection 10.25.1.30:54208->10.25.1.14:22 to "SSH-2.0-OpenSSH_8.0"
2023/08/27 03:02:56 DEBUG : sftp://david@frier-nas-03.home.arpa:22/Backups/davidbkups/: Shell type "unix" from config
2023/08/27 03:02:56 DEBUG : sftp://david@frier-nas-03.home.arpa:22/Backups/davidbkups/: Relative path resolved to "/share/CACHEDEV1_DATA/homes/david/Backups/davidbkups"
2023/08/27 03:02:56 DEBUG : sftp://david@frier-nas-03.home.arpa:22/Backups/davidbkups/: Using root directory "/share/CACHEDEV1_DATA/homes/david/Backups/davidbkups"
2023/08/27 03:02:56 INFO : sftp://david@frier-nas-03.home.arpa:22/Backups/davidbkups/: Running all checks before starting transfers
[... almost 6500 more lines exactly like those two ...]
2023/08/27 03:02:56 INFO : sftp://david@frier-nas-03.home.arpa:22/Backups/davidbkups/: Checks finished, now starting transfers
2023/08/27 03:02:56 DEBUG : sftp://david@frier-nas-03.home.arpa:22/Backups/davidbkups/: Waiting for transfers to finish
2023/08/27 03:02:56 DEBUG : Waiting for deletions to finish
2023/08/27 03:02:56 INFO : There was nothing to transfer
2023/08/27 03:02:56 INFO :
Transferred: 0 B / 0 B, -, 0 B/s, ETA -
Checks: 3243 / 3243, 100%
Elapsed time: 0.3s
2023/08/27 03:02:56 DEBUG : 13 go routines active
2023/08/27 03:02:56 DEBUG : sftp://david@frier-nas-03.home.arpa:22/Backups/davidbkups/: Closing 1 unused connections
And when I run the same script from a cron job (also as david
)
2023/08/27 02:59:54 DEBUG : rclone: Version "v1.63.1" starting with parameters ["rclone" "sync" "-vv" "/media/david/Seag8/davidbkups/" "QNap3:Backups/davidbkups/"]
2023/08/27 02:59:54 DEBUG : Creating backend with remote "/media/david/Seag8/davidbkups/"
2023/08/27 02:59:54 DEBUG : Using config file from "/home/david/.config/rclone/rclone.conf"
2023/08/27 02:59:54 DEBUG : fs cache: renaming cache item "/media/david/Seag8/davidbkups/" to be canonical "/media/david/Seag8/davidbkups"
2023/08/27 02:59:54 DEBUG : Creating backend with remote "QNap3:Backups/davidbkups/"
2023/08/27 02:59:54 Failed to create file system for "QNap3:Backups/davidbkups/": couldn't connect to ssh-agent: SSH agent requested but SSH_AUTH_SOCK not-specified