I use rclone (within Freenas nightly) to copy to a Google cloud storage bucket with a retention policy. The policy is used to keep some older, big files for a long time, while those files must not be deleted under any circumstances.
The copying process runs smoothly, but it ends with a "forbidden" error: "Failed to copy: googleapi: Error 403: Object '...' is subject to bucket's retention policy and can not be deleted, overwritten or archived until ... "forbidden".
Isn´t this the behavior of a sync? A copy would only have to skip the old files with the retention policy? Or do I understand the systematics wrong?
Sorry, but I have no idea how to start the command manually with the -vv parameter in Freenas, the "cloud-sync" should still run on the Web GUI of Freenas (and not as cronjob set up via the command line)
So without any thing else, I would have to guess it's a new file with the same name trying to overwrite the old file and it's failing because of the policy.
So it seems to be doing the right thing and throwing an error based on your storage policy.
I already understood that: a file that has not been changed will be skipped, a changed file will be copied. But that's not what rclone does in Freenas: it does not skip unmodified files, but tries to copy/upload them again.
The retention policy in GCS may prevent feedback about the "correct" file content to rclone.
Maybe this is a bit OT, but how do I logically copy backups that have only one changing file with the same name (ie the above backup chain file, the rest of the files change name every day) to online storage with a retention policy, without rclone issuing errors?
Actually, I'm looking for a parameter that instructs rclone to upload a copy of this file with the same file name?
Or does someone think of another possibility?
The goal is to prevent daily backups in the online store from being deleted by anyone (even the owner)
I think you are probably looking for either --copy-dest or --compare-dest - they will allow you to make a non-sparse/sparse backup of only the changed files without changing the current backup.
I probably do not quite understand the parameters yet, but I do not think that solves the problem of the "veeam backup chain metadata" files. The file has the same name after each backup, but changes.
How can rclone back up these changed files to immutable storage?
rclone will compare any files it is copying with original-backup and if they are different store them in new-backup. So original-backup is immutable and any differences are stored in new-backup.