Custom path vor --log-file

Good morning,

is it possible to set a custom path for the output from --log-file. I tried to use /var/log/rclone.log but this doesen't work.

Hi, welcome to the forum!

Yes, it is possible and it should work.

I suggest you create a new topic and fill out the support template, then we have the information needed to help you.

What is the problem you are having with rclone?

What is your rclone version (output from rclone version)

rclone v1.56.0

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Synology DSM7

Which cloud storage system are you using? (eg Google Drive)

Onedrive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

Paste command here
sudo rclone sync /volume1/homes/daniel synotoonedrive:/daniel --progress -vv --log-file /var/log/rclone.log

The rclone config contents with secrets removed.

Paste config here

A log from the command with the -vv flag

Paste  log here

The solution ist:
sudo rclone sync /volume1/homes/daniel synotoonedrive:/daniel --progress -vv --log-file=/var/log/rclone.log

the only problem is now what permission is needed vor /var/log/rclone.log?

Generally if you want to try to /var/log, you need to make a file and ensure that you have permissions to that file.

You can use something /tmp/rclone.log and not need permissions.

As an example:

felix@gemini:~$ sudo su -
root@gemini:~# touch /var/log/rclone.log
root@gemini:~# ls -al /var/log/rclone.log
-rw-r--r-- 1 root root 0 Aug 30 07:49 /var/log/rclone.log
root@gemini:~# chown felix:felix /var/log/rclone.log
root@gemini:~# exit
logout
felix@gemini:~$ cat /var/log/rclone.log
felix@gemini:~$ rclone lsd GD: --log-file /var/log/rclone.log -vv
2021/08/30 07:50:07 DEBUG : Setting --config "/opt/rclone/rclone.conf" from environment variable RCLONE_CONFIG="/opt/rclone/rclone.conf"
2021/08/30 07:50:07 DEBUG : Setting --user-agent "animosityapp" from environment variable RCLONE_USER_AGENT="animosityapp"
2021/08/30 07:50:07 DEBUG : Setting --rc-user "felix" from environment variable RCLONE_RC_USER="felix"
2021/08/30 07:50:07 DEBUG : Setting --rc-pass "felix" from environment variable RCLONE_RC_PASS="felix"
2021/08/30 07:50:07 DEBUG : Setting default for drive-pacer-min-sleep="10ms" from environment variable RCLONE_DRIVE_PACER_MIN_SLEEP
2021/08/30 07:50:07 DEBUG : Setting default for drive-pacer-burst="1000" from environment variable RCLONE_DRIVE_PACER_BURST
          -1 2021-08-22 09:32:03        -1 Test
          -1 2020-12-27 15:33:11        -1 backups
          -1 2019-09-29 21:57:58        -1 crypt
          -1 2021-07-26 20:43:15        -1 test
felix@gemini:~$ cat /var/log/rclone.log
2021/08/30 07:50:07 DEBUG : rclone: Version "v1.56.0" starting with parameters ["rclone" "lsd" "GD:" "--log-file" "/var/log/rclone.log" "-vv"]
2021/08/30 07:50:07 DEBUG : Creating backend with remote "GD:"
2021/08/30 07:50:07 DEBUG : Using config file from "/opt/rclone/rclone.conf"
2021/08/30 07:50:07 DEBUG : Setting drive_pacer_min_sleep="10ms" from environment variable RCLONE_DRIVE_PACER_MIN_SLEEP
2021/08/30 07:50:07 DEBUG : Setting drive_pacer_burst="1000" from environment variable RCLONE_DRIVE_PACER_BURST
2021/08/30 07:50:07 DEBUG : GD: detected overridden config - adding "{TKSWb}" suffix to name
2021/08/30 07:50:07 DEBUG : Setting drive_pacer_min_sleep="10ms" from environment variable RCLONE_DRIVE_PACER_MIN_SLEEP
2021/08/30 07:50:07 DEBUG : Setting drive_pacer_burst="1000" from environment variable RCLONE_DRIVE_PACER_BURST
2021/08/30 07:50:07 DEBUG : fs cache: renaming cache item "GD:" to be canonical "GD{TKSWb}:"
2021/08/30 07:50:07 DEBUG : 4 go routines active
felix@gemini:~$
1 Like

Thanks!

But when logrodate greate a new file what permission have the file?

Whatever user you are running as if non root. I am not sure what user you are using.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.