Hello,
I have a problem with the execution time or the expiration of the token.
I wanted to send small backup files to Gdrive once a day automatically.
I installed the "butdr" utility which integrates rclone to do this.
I did the configuration normally:
- Create a project on https://console.cloud.google.com/
- Creation of an OAuth 2.0 client ID
- Enter Client ID, Secret Code and Folder ID in config file.
- Authorization via web browser link, token distribution and saving.
2024/05/23 11:33:58 NOTICE: Config file "/root/.config/rclone/rclone.conf" not found - using defaults
Remote config
Use auto config?
* Say Y if not sure
* Say N if you are working on a remote or headless machine
Auto confirm is set: answering No, override by setting config parameter config_is_local=true
Please go to the following link: https://accounts.google.com/o/oauth2/
[ 23/05/2024 11:34:26 ] Connect Google Drive successful
How many days do you want to keep backup on Cloud?(default 7): 7
Do you want only sync file(default no)(y/n): n
Do you want compress directory before upload?(default no)(y/n): n
When I run this command :
root@GIN:~# cron_backup.bash -v
Here's the result:
[ 23/05/2024 11:35:20 ] ---
[ 23/05/2024 11:35:20 ] Checking OS...
[ 23/05/2024 11:35:20 ] OS supported
[ 23/05/2024 11:35:20 ] Start upload to Cloud...
[ 23/05/2024 11:35:21 ] [drive] Checking connect to drive...
[ 23/05/2024 11:35:21 ] [drive] [INFO] Connect drive successful
[ 23/05/2024 11:35:21 ] [drive] [INFO] You do not compress directory before upload
[ 23/05/2024 11:35:21 ] [drive] Uploading from /tmp/backup to 23_05_2024 on Cloud
Transferred: 0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks: 113 / 113, 100%
Elapsed time: 1.2s
[ 23/05/2024 11:35:22 ] [drive] [UPLOAD] Finish! All files and directories in /tmp/backup are uploaded to Cloud
[ 23/05/2024 11:35:23 ] [drive] Directory 16_05_2024 on Cloud does not exist. Nothing need remove!
[ 23/05/2024 11:35:23 ] Finish! All files and directories are uploaded or synced to Cloud
[ 23/05/2024 11:35:23 ] Run time: 00h00m03s
But after 1 week precisely (several times), here is the message:
[drive] [CHECK][FAIL] Can not connect drive with your credential, please check again. Exit
It works again if you regenerate manually an OAuth token.
I thought Rclone was able to continue without regenerating?
Thanks for your help