What is the problem you are having with rclone?
I´m moving files from the local filesystem to a GoogleStorage Bucket with limited read/write-acess. Files can only be listed and uploaded but not be read or get deleted with the account I created solely for this backup task. Worked fine for several weeks now. But now it failed due to a file that was already existing in the bucket (and couldn´t be overwritten, which just worked as designed).
The file in the bucket wasn´t complete (4MB instead of 40MB), when I deleted it manually in the bucket and re-run my script it was uploaded fully and also removed from the filesystem this time.
What bothers me is that the first logfile states that the "secondFile.2021-10-08.tar.gz" was uploaded and deleted. So it seems that this upload failed silently while the log states something else ?!? ( I also check for the exit-code of the rclone-command in the script, which was 0)
Any ideas what could have happened here ? I increased the loglevel now to -vv, but I don´t expect much better info if this issue happens again as the details for a single transfer didnt increase...
Run the command 'rclone version' and share the full output of the command.
rclone v1.47.0
- os/arch: linux/amd64
- go version: go1.11.5
Which cloud storage system are you using? (eg Google Drive)
Google Cloud Storage with a special account that is only allowed to store and list files.
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
rclone -v move --log-file=<myLogFile> --min-age 183d <MySourceDir> <MyRemote>:<MyBucket>
The rclone config contents with secrets removed.
[MyRemote]
type = google cloud storage
service_account_file = /home/<user>/.config/rclone/<user@remote>.json
bucket_policy_only = true
location = EU
storage_class = NEARLINE
client_id = <UserID>
project_number = <MyProject>
object_acl = private
bucket_acl = private
A log from the command with the -vv
flag
Logfile from 19.04 which stated that "secondFile.2021-10-08.tar.gz" got moved:
...
2022/04/19 02:06:42 INFO : firstFile.2021-10-13.tar.gz: Copied (new)
2022/04/19 02:06:42 INFO : firstFile.2021-10-13.tar.gz: Deleted
2022/04/19 02:06:42 INFO : secondFile.2021-10-08.tar.gz: Copied (new)
2022/04/19 02:06:42 INFO : secondFile.2021-10-08.tar.gz: Deleted
2022/04/19 02:06:42 INFO : thirdFile.2021-10-13.tar.gz: Copied (new)
2022/04/19 02:06:42 INFO : thirdFile.2021-10-13.tar.gz: Deleted
...
Logfile from 20.04 which states that "secondFile.tar.gz" already exists in Bucket:
...
2022/04/20 02:06:26 INFO : randomFile.2021-10-14.tar.gz: Copied (new)
2022/04/20 02:06:26 INFO : randomFile.2021-10-14.tar.gz: Deleted
2022/04/20 02:06:27 ERROR : secondFile.2021-10-08.tar.gz: Failed to copy: googleapi: Error 403: <User@project>.iam.gserviceaccount.com does not have storage.objects.delete access to the Google Cloud Storage object., forbidden
2022/04/20 02:06:27 ERROR : secondFile.2021-10-08.tar.gz: Not deleting source as copy failed: googleapi: Error 403: <user@project>.iam.gserviceaccount.com does not have storage.objects.delete access to the Google Cloud Storage object., forbidden
2022/04/20 02:06:34 INFO : randomFile2.2021-10-14.tar.gz: Copied (new)
2022/04/20 02:06:34 INFO : randomFile2.2021-10-14.tar.gz: Deleted
...