What is the problem you are having with rclone?
Hello everyone,
So, I am trying to create a tar of a folder and then upload to GoogleDrive.
I have been trying to get it to work, but strangely the upload does not work (the 1.7 GB file is only 56 kB on server).
tar --warning=no-file-changed -zcvf homeassistant.tar.gz /home/piserver/homeassistant/ | rclone rcat GoogleDrive:/homeassistant_backup/data_$(date "+%Y-%m-%d_%H:%M:%S").tar.gz -vv
I am still rather new to Linux, so I hope someone can help me figure out what is wrong in my syntax and how to achieve the auto-deletion part?
Thank you all for your help
Alex
Run the command 'rclone version' and share the full output of the command.
rclone v1.63.1
- os/version: raspbian 11.7 (64 bit)
- os/kernel: 6.1.21-v8+ (aarch64)
- os/type: linux
- os/arch: arm64 (ARMv8 compatible)
- go/version: go1.20.6
- 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
)
tar --warning=no-file-changed -zcvf homeassistant.tar.gz /home/piserver/homeassistant/ | rclone rcat GoogleDrive:/homeassistant_backup/data_$(date "+%Y-%m-%d_%H:%M:%S").tar.gz -vv
The rclone config contents with secrets removed.
[GoogleDrive]
type = drive
client_id = deleted
client_secret = deleted
scope = drive
token = deleted
team_drive =
A log from the command with the -vv
flag
tar --warning=no-file-changed -zcvf homeassistant.tar.gz /home/piserver/homeassistant/ | rclone rcat GoogleDrive:/homeassistant_backup/data_$(date "+%Y-%m-%d_%H:%M:%S").tar.gz -vv
tar: Removing leading `/' from member names
tar: /home/piserver/homeassistant/config/.storage/core.uuid: Cannot open: Permission denied
tar: /home/piserver/homeassistant/config/.storage/auth: Cannot open: Permission denied
tar: /home/piserver/homeassistant/config/.storage/core.config: Cannot open: Permission denied
tar: /home/piserver/homeassistant/config/.storage/auth_provider.homeassistant: Cannot open: Permission denied
tar: /home/piserver/homeassistant/config/.storage/onboarding: Cannot open: Permission denied
2023/08/08 18:03:33 DEBUG : rclone: Version "v1.63.1" starting with parameters ["rclone" "rcat" "GoogleDrive:/homeassistant_backup/data_2023-08-08_18:03:33.tar.gz" "-vv"]
2023/08/08 18:03:33 DEBUG : Creating backend with remote "GoogleDrive:/homeassistant_backup/"
2023/08/08 18:03:33 DEBUG : Using config file from "/home/piserver/.config/rclone/rclone.conf"
2023/08/08 18:03:33 DEBUG : Google drive root 'homeassistant_backup': 'root_folder_id = 0AMvUk9PVA' - save this in the config to speed up startup
2023/08/08 18:03:34 DEBUG : fs cache: renaming cache item "GoogleDrive:/homeassistant_backup/" to be canonical "GoogleDrive:homeassistant_backup"
tar: Exiting with failure status due to previous errors
2023/08/08 18:12:28 DEBUG : Google drive root 'homeassistant_backup': File to upload is small (57908 bytes), uploading instead of streaming
2023/08/08 18:12:30 DEBUG : data_2023-08-08_18:03:33.tar.gz: md5 = c4ce63220cda2f5185b6d0 OK
2023/08/08 18:12:30 INFO : data_2023-08-08_18:03:33.tar.gz: Copied (new)
2023/08/08 18:12:30 DEBUG : 8 go routines active
but
-rw-r--r-- 1 piserver piserver 1865910162 Aug 8 18:12 homeassistant.tar.gz