New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--b2-hard-delete creating/keeping versions #2403
Comments
I would say rclone is calling the correct API... First non --hard-delete
Now with --hard-delete
Can you make a little sequence like that which shows the problem - maybe using |
Why are you using Here is another extensive test with logs:
So we have one file in there. Let's edit it:
And here we have the old version of hello.txt :/ Or am I just using the commands all wrong? |
Sorry, wrong button 😕 |
Ah, I see what you mean - great demo! I think if you'd deleted hello.txt instead of giving it new content then rclone would have done what you expected. So what is happening is that when rclone uploads a new hello.txt, b2 is creating a new version. At no time does rclone issue a delete so So I think the What do you think it should do? When rclone comes to update a file that already exists, do a hard delete on the existing file to stop b2 creating a new version? Maybe that should be a different flag I think the upload api always creates a new version so if we don't want to do that then we'll have to delete any existing file. |
Ah ok, I got the docs at versioning wrong then. Sorry for that! I thought it means that also when uploading new or changed files, there won't be hidden ones and only one version. I also found the info that if you set the lifecycle rules to "Keep Only Last Version" in the B2 docs means that it will stick around for one day: "This keeps only the most current version of a file. The previous version of the file is “hidden” for one day and then deleted." Since I am planning to keep versions on my own, an option would be great to delete older versions or hidden files completely. Maybe with the option Thanks for the clarification and I hope to see that flag some day :) |
Would deleting changed files during a sync use additional B2 transactions? If so then it might be more cost effective to just let B2 expire the hidden files in a day rather than forcibly delete them. |
@dlong500 wrote:
deletes are free at b2. So rclone would have to know the ID of the existing file (which it should already) to delete it afterwards. I think if it were me I'd stick with the delete after 1 day as that gives you 24 hours to recover stuff if stuff goes wrong. |
@atomtigerzoo @dlong500 This problem is reported against obsolete rclone version. Can you reproduce it with rclone 1.54? |
Closing answered questions |
I can, on rclone v1.57.0 - please see here on the Rclone forum. EDITED. |
What is the problem you are having with rclone?
The command
is still creating versions on B2, not removing old files.
I changed the
index.html
several times, then issuing the command above. Always getting a new version of the file. Lifecycle settings of the bucket are set keep only the current version.What is your rclone version (eg output from
rclone -V
)rclone v1.42
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Debian stable
Which cloud storage system are you using? (eg Google Drive)
B2
The command you were trying to run (eg
rclone copy /tmp remote:tmp
)A log from the command with the
-vv
flag (eg output fromrclone -vv copy /tmp remote:tmp
)The text was updated successfully, but these errors were encountered: