What is the problem you are having with rclone?
I'm running rclone rcd
through the official docker container hosted on a Ubuntu Server machine. I'm sending rclone jobs from one container to the other through the rclone API. Communication between the containers is fine, but I want to set the log-level and log-file on a per request basis.
My end goal is to have 1 log file for this specific sync task that gets filled with output from my bash script and with rclone output. However I can't seem to get any output from rclone to the log file.
The sync goes perfect, and from within the rclone container I can read and write to the mounted /config/rclone/duplicati.log
. But I don't see anything written to the log file. What am I doing wrong?
What is your rclone version (output from rclone version
)
rclone v1.57.0
- os/version: alpine 3.14.2 (64 bit)
- os/kernel: 5.4.0-89-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.17.2
- go/linking: static
- go/tags: none
Which cloud storage system are you using? (eg Google Drive)
Google Drive
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
curl -s \
-H "Content-Type: application/json" \
-X POST \
-d "${payload}" \
"http://${rclone_user}:${rclone_pass}@${rclone_host}:${rclone_port}/sync/sync
Where the payload contains this JSON data:
{
"srcFs":"/data/backups/databases",
"dstFs":"gdrive:/backups/databases",
"createEmptySrcDirs":true,
"_async":true,
"_config":{
"LogFile":"/config/rclone/duplicati.log",
"LogLevel":"INFO"
}
}
also tried:
{
"srcFs":"/data/backups/databases",
"dstFs":"gdrive:/backups/databases",
"createEmptySrcDirs":true,
"_async":true,
"_config":{
"main":{
"LogLevel":"INFO"
},
"log":{
"File":"/config/rclone/duplicati.log"
}
}
}
The rclone config contents with secrets removed.
[gdrive]
type = drive
client_id = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com
client_secret = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
scope = drive
root_folder_id = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
token = {"access_token":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","token_type":"Bearer","refresh_token":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","expiry":"2021-11-26T13:41:15.394141915+01:00"}
team_drive =
A log from the command with the -vv
flag
2021/11/26 13:47:08 DEBUG : rclone: Version "v1.57.0" starting with parameters ["rclone" "rcd" "-vv" "--rc-web-gui" "--rc-addr=:5572" "--cache-dir=/config/rclone/cache" "--rc-web-gui-no-open-browser" "--rc-user=XXXX" "--rc-pass=XXXX"]
2021/11/26 13:47:08 DEBUG : Current tag: v2.0.5, Release tag: v2.0.5
2021/11/26 13:47:08 NOTICE: Web GUI exists. Update skipped.
2021/11/26 13:47:08 NOTICE: Serving Web GUI
2021/11/26 13:47:08 INFO : Using --user XXXX --pass XXXX as authenticated user
2021/11/26 13:47:08 NOTICE: Serving remote control on http://[::]:5572/
2021/11/26 13:47:08 DEBUG : login_token "XXXX"
2021/11/26 13:47:08 NOTICE: Web GUI is not automatically opening browser. Navigate to http://XXXX:XXXX@[::]:5572/?login_token=XXXX to use.
2021/11/26 13:47:44 DEBUG : rc: "core/stats": with parameters map[]
2021/11/26 13:47:44 DEBUG : rc: "core/stats": reply map[bytes:0 checks:0 deletedDirs:0 deletes:0 elapsedTime:36.153259961 errors:0 eta:<nil> fatalError:false renames:0 retryError:false speed:0 totalBytes:0 totalChecks:0 totalTransfers:0 transferTime:0 transfers:0]: <nil>
2021/11/26 13:48:44 DEBUG : rc: "core/stats": with parameters map[]
2021/11/26 13:48:44 DEBUG : rc: "core/stats": reply map[bytes:0 checks:0 deletedDirs:0 deletes:0 elapsedTime:96.153769019 errors:0 eta:<nil> fatalError:false renames:0 retryError:false speed:0 totalBytes:0 totalChecks:0 totalTransfers:0 transferTime:0 transfers:0]: <nil>
2021/11/26 13:49:44 DEBUG : rc: "core/stats": with parameters map[]
2021/11/26 13:49:44 DEBUG : rc: "core/stats": reply map[bytes:0 checks:0 deletedDirs:0 deletes:0 elapsedTime:156.149964871 errors:0 eta:<nil> fatalError:false renames:0 retryError:false speed:0 totalBytes:0 totalChecks:0 totalTransfers:0 transferTime:0 transfers:0]: <nil>
2021/11/26 13:49:54 DEBUG : rc: "sync/sync": with parameters map[_async:true _config:map[log:map[File:/config/rclone/duplicati.log] main:map[LogLevel:INFO]] createEmptySrcDirs:true dstFs:gdrive:/backups/databases srcFs:/data/backups/databases]
2021/11/26 13:49:54 DEBUG : rc: "sync/sync": reply map[jobid:4]: <nil>
2021/11/26 13:49:54 DEBUG : Creating backend with remote "/data/backups/databases"
2021/11/26 13:49:54 DEBUG : Using config file from "/config/rclone/rclone.conf"
2021/11/26 13:49:54 DEBUG : Creating backend with remote "gdrive:/backups/databases"
2021/11/26 13:49:54 DEBUG : gdrive: Loaded invalid token from config file - ignoring
2021/11/26 13:49:54 DEBUG : Saving config "token" in section "gdrive" of the config file
2021/11/26 13:49:54 DEBUG : gdrive: Saved new token in config file
2021/11/26 13:49:55 DEBUG : fs cache: renaming cache item "gdrive:/backups/databases" to be canonical "gdrive:backups/databases"
2021/11/26 13:49:55 DEBUG : duplicati-20211121T020000Z.dlist.zip.aes: Size and modification time the same (differ by -847.562µs, within tolerance 1ms)
2021/11/26 13:49:55 DEBUG : duplicati-20211122T020000Z.dlist.zip.aes: Size and modification time the same (differ by -638.231µs, within tolerance 1ms)
2021/11/26 13:49:55 DEBUG : duplicati-20211121T020000Z.dlist.zip.aes: Unchanged skipping
2021/11/26 13:49:55 DEBUG : duplicati-20211122T020000Z.dlist.zip.aes: Unchanged skipping
2021/11/26 13:49:55 DEBUG : duplicati-20211120T020000Z.dlist.zip.aes: Size and modification time the same (differ by -806.643µs, within tolerance 1ms)
2021/11/26 13:49:55 DEBUG : duplicati-b4c782be9089449da856f76c4d4455d21.dblock.zip.aes: Size and modification time the same (differ by -655.488µs, within tolerance 1ms)
2021/11/26 13:49:55 DEBUG : duplicati-b4c782be9089449da856f76c4d4455d21.dblock.zip.aes: Unchanged skipping
2021/11/26 13:49:55 DEBUG : duplicati-b2a522740a56c4d21b97ed36648511185.dblock.zip.aes: Size and modification time the same (differ by -847.427µs, within tolerance 1ms)
2021/11/26 13:49:55 DEBUG : duplicati-b20e8ef1f588045a2855c75c447fafa67.dblock.zip.aes: Size and modification time the same (differ by -593.772µs, within tolerance 1ms)
2021/11/26 13:49:55 DEBUG : duplicati-b585860f4971e4a99a789114fc3ec1337.dblock.zip.aes: Size and modification time the same (differ by -416.978µs, within tolerance 1ms)
2021/11/26 13:49:55 DEBUG : duplicati-20211123T020000Z.dlist.zip.aes: Size and modification time the same (differ by -417.089µs, within tolerance 1ms)
2021/11/26 13:49:55 DEBUG : duplicati-b585860f4971e4a99a789114fc3ec1337.dblock.zip.aes: Unchanged skipping
2021/11/26 13:49:55 DEBUG : duplicati-b20e8ef1f588045a2855c75c447fafa67.dblock.zip.aes: Unchanged skipping
2021/11/26 13:49:55 DEBUG : duplicati-b7eb3c8a9e4514878b624b7de315b363e.dblock.zip.aes: Size and modification time the same (differ by -59.506µs, within tolerance 1ms)
2021/11/26 13:49:55 DEBUG : duplicati-b7eb3c8a9e4514878b624b7de315b363e.dblock.zip.aes: Unchanged skipping
2021/11/26 13:49:55 DEBUG : duplicati-b8b469358715a4d8eb8d2df898b9f0ee7.dblock.zip.aes: Size and modification time the same (differ by -582.742µs, within tolerance 1ms)
2021/11/26 13:49:55 DEBUG : duplicati-b8b469358715a4d8eb8d2df898b9f0ee7.dblock.zip.aes: Unchanged skipping
2021/11/26 13:49:55 DEBUG : duplicati-bd95f362e88e246ccb2c3f7312b14827d.dblock.zip.aes: Size and modification time the same (differ by -46.332µs, within tolerance 1ms)
2021/11/26 13:49:55 DEBUG : duplicati-bd95f362e88e246ccb2c3f7312b14827d.dblock.zip.aes: Unchanged skipping
2021/11/26 13:49:55 DEBUG : duplicati-bdbb37581fcef4771a75bf339dcbf65bd.dblock.zip.aes: Size and modification time the same (differ by -5.107µs, within tolerance 1ms)
2021/11/26 13:49:55 DEBUG : Google drive root 'backups/databases': Waiting for checks to finish
2021/11/26 13:49:55 DEBUG : duplicati-be44582a8348c4ec38aefd21f558242c6.dblock.zip.aes: Size and modification time the same (differ by -806.508µs, within tolerance 1ms)
2021/11/26 13:49:55 DEBUG : duplicati-20211123T020000Z.dlist.zip.aes: Unchanged skipping
2021/11/26 13:49:55 DEBUG : duplicati-20211126T020000Z.dlist.zip.aes: Size and modification time the same (differ by -582.875µs, within tolerance 1ms)
2021/11/26 13:49:55 DEBUG : duplicati-be44582a8348c4ec38aefd21f558242c6.dblock.zip.aes: Unchanged skipping
2021/11/26 13:49:55 DEBUG : duplicati-i16eeefb8b7a74576a17288c90af423b9.dindex.zip.aes: Size and modification time the same (differ by -806.581µs, within tolerance 1ms)
2021/11/26 13:49:55 DEBUG : duplicati-i16eeefb8b7a74576a17288c90af423b9.dindex.zip.aes: Unchanged skipping
2021/11/26 13:49:55 DEBUG : duplicati-20211126T020000Z.dlist.zip.aes: Unchanged skipping
2021/11/26 13:49:55 DEBUG : duplicati-i52a92a7cc8b9436d92ab6106eba18355.dindex.zip.aes: Size and modification time the same (differ by -59.587µs, within tolerance 1ms)
2021/11/26 13:49:55 DEBUG : duplicati-i52a92a7cc8b9436d92ab6106eba18355.dindex.zip.aes: Unchanged skipping
2021/11/26 13:49:55 DEBUG : duplicati-beb10f8246dde4e6ca7200af8460789d7.dblock.zip.aes: Size and modification time the same (differ by -638.097µs, within tolerance 1ms)
2021/11/26 13:49:55 DEBUG : duplicati-i8fd4efd69016467b9e1e4c3bf767dd95.dindex.zip.aes: Size and modification time the same (differ by -582.818µs, within tolerance 1ms)
2021/11/26 13:49:55 DEBUG : duplicati-i8fd4efd69016467b9e1e4c3bf767dd95.dindex.zip.aes: Unchanged skipping
2021/11/26 13:49:55 DEBUG : duplicati-beb10f8246dde4e6ca7200af8460789d7.dblock.zip.aes: Unchanged skipping
2021/11/26 13:49:55 DEBUG : duplicati-i76282620b38944459195dc803ef5b901.dindex.zip.aes: Size and modification time the same (differ by -847.494µs, within tolerance 1ms)
2021/11/26 13:49:55 DEBUG : duplicati-bdbb37581fcef4771a75bf339dcbf65bd.dblock.zip.aes: Unchanged skipping
2021/11/26 13:49:55 DEBUG : duplicati-i76282620b38944459195dc803ef5b901.dindex.zip.aes: Unchanged skipping
2021/11/26 13:49:55 DEBUG : duplicati-ib456b4e61096415787848f2306281679.dindex.zip.aes: Size and modification time the same (differ by -593.845µs, within tolerance 1ms)
2021/11/26 13:49:55 DEBUG : duplicati-ibf2ba4fb278c44ed9177ad2dcdeccd91.dindex.zip.aes: Size and modification time the same (differ by -46.407µs, within tolerance 1ms)
2021/11/26 13:49:55 DEBUG : duplicati-ib456b4e61096415787848f2306281679.dindex.zip.aes: Unchanged skipping
2021/11/26 13:49:55 DEBUG : duplicati-i99ba762dcab34040a25dd1d06a55dc80.dindex.zip.aes: Size and modification time the same (differ by -417.039µs, within tolerance 1ms)
2021/11/26 13:49:55 DEBUG : duplicati-i99ba762dcab34040a25dd1d06a55dc80.dindex.zip.aes: Unchanged skipping
2021/11/26 13:49:55 DEBUG : duplicati-iccf7397b48cd4154b6e1305e59554a8d.dindex.zip.aes: Size and modification time the same (differ by -655.558µs, within tolerance 1ms)
2021/11/26 13:49:55 DEBUG : duplicati-iccf7397b48cd4154b6e1305e59554a8d.dindex.zip.aes: Unchanged skipping
2021/11/26 13:49:55 DEBUG : duplicati-ie5dd147991934642b2a3ad19ac9eff2b.dindex.zip.aes: Size and modification time the same (differ by -638.181µs, within tolerance 1ms)
2021/11/26 13:49:55 DEBUG : duplicati-ie5dd147991934642b2a3ad19ac9eff2b.dindex.zip.aes: Unchanged skipping
2021/11/26 13:49:55 DEBUG : duplicati-20211124T020000Z.dlist.zip.aes: Size and modification time the same (differ by -59.657µs, within tolerance 1ms)
2021/11/26 13:49:55 DEBUG : duplicati-20211124T020000Z.dlist.zip.aes: Unchanged skipping
2021/11/26 13:49:55 DEBUG : duplicati-ibe91882fa32b4143ad7777a883f8fcfc.dindex.zip.aes: Size and modification time the same (differ by -5.159µs, within tolerance 1ms)
2021/11/26 13:49:55 DEBUG : duplicati-ibe91882fa32b4143ad7777a883f8fcfc.dindex.zip.aes: Unchanged skipping
2021/11/26 13:49:55 DEBUG : duplicati-b2a522740a56c4d21b97ed36648511185.dblock.zip.aes: Unchanged skipping
2021/11/26 13:49:55 DEBUG : duplicati-ibf2ba4fb278c44ed9177ad2dcdeccd91.dindex.zip.aes: Unchanged skipping
2021/11/26 13:49:55 DEBUG : duplicati-20211120T020000Z.dlist.zip.aes: Unchanged skipping
2021/11/26 13:49:55 DEBUG : duplicati-20211125T020000Z.dlist.zip.aes: Size and modification time the same (differ by -655.62µs, within tolerance 1ms)
2021/11/26 13:49:55 DEBUG : duplicati-20211125T020000Z.dlist.zip.aes: Unchanged skipping
2021/11/26 13:49:55 DEBUG : Google drive root 'backups/databases': Waiting for transfers to finish
2021/11/26 13:49:55 DEBUG : Waiting for deletions to finish
2021/11/26 13:49:55 INFO : There was nothing to transfer