You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm using rclone to make a copy of my time machine backups. Since the introduction of mod time based checking, I'm getting a lot more uploads. I guess this is fine, but since there is no option to remove previous file versions, my bucket size is growing really fast now. So, I think a command or an option to remove previous versions upon upload could be very useful in such cases.
I could see this working with a flag --b2-no-versions which if set would mean
after uploading a file, delete any older versions of that file
Or alternatively I could add a flag (or command) which deleted all the older versions. If it was a command it could be called emptytrash or cleanup or something like that. This could then be adapted to the other Fs which have the concept of trash that you can empty (eg Drive).
I'm glad to hear I got you interested in this. I think combining the two solutions would be ideal but a separate command like cleanup would be fine too – it would just need to be executed after each backup session.
Reacted by Dustin Montgomery and LinuxOnTheDesktop
Are there any progress on this? I'm currently working on my backup system and stumbled upon this. While this is not a problem for now as I'm not done with all the other parts yet, I would like to know if there are any timeline to get this functionality to work as it will definitely become an issue at one part
I can potentially take this on if there is no timeline in getting this to work, but I'm not sure if I will have the time right now.
I'm not working on this at the moment, so any help much appreciated :-) To implement the cleanup command I'd add an optional interface CleanUp to the Fs which would then remove all the trash for a given Fs. This could then be implemented for b2 and later for drive, acd, onedrive all of which have trash which can be emptied.
Hello @ncw
When I move the files in local and run sync, the latest previous file version is changed to 'hidden' state.
The size of the file version is zero, but it still shows in the file lists of the bucket.
To delete hidden and alone files in cleanup operation, I wrote the code. It works well in my case.
Now, I am curious about the reason to remain the hidden files. Are there any speical reasons?
If not, could I push the branch and pull requests?
@NoSyu - looks like b2 now has "lifetime" settings accessible from a web interface that allow control over how long "hidden" files stick around and when they get deleted.
looks like b2 now has "lifetime" settings accessible from a web interface that allow control over how long "hidden" files stick around and when they get deleted.
Yes, but even if one uses that GUI to tell b2 to delete files immediately, rclone still manages to treat a deleted file, for a day, as if it were not deleted (!). See #2403.
Activity
ncw commentedon Apr 29, 2016
Good idea.
I could see this working with a flag
--b2-no-versionswhich if set would meanOr alternatively I could add a flag (or command) which deleted all the older versions. If it was a command it could be called
emptytrashorcleanupor something like that. This could then be adapted to the other Fs which have the concept of trash that you can empty (eg Drive).witq commentedon Apr 29, 2016
I'm glad to hear I got you interested in this. I think combining the two solutions would be ideal but a separate command like
cleanupwould be fine too – it would just need to be executed after each backup session.shuhaowu commentedon Jun 3, 2016
Are there any progress on this? I'm currently working on my backup system and stumbled upon this. While this is not a problem for now as I'm not done with all the other parts yet, I would like to know if there are any timeline to get this functionality to work as it will definitely become an issue at one part
I can potentially take this on if there is no timeline in getting this to work, but I'm not sure if I will have the time right now.
ncw commentedon Jun 3, 2016
I'm not working on this at the moment, so any help much appreciated :-) To implement the
cleanupcommand I'd add an optional interfaceCleanUpto the Fs which would then remove all the trash for a given Fs. This could then be implemented for b2 and later for drive, acd, onedrive all of which have trash which can be emptied.ncw commentedon Jul 2, 2016
Here is a beta with the
cleanupcommand: http://pub.rclone.org/v1.30-21-g018fe80%CE%B2/NoSyu commentedon Jul 13, 2016
Hello @ncw
When I move the files in local and run sync, the latest previous file version is changed to 'hidden' state.
The size of the file version is zero, but it still shows in the file lists of the bucket.
To delete hidden and alone files in cleanup operation, I wrote the code. It works well in my case.
Now, I am curious about the reason to remain the hidden files. Are there any speical reasons?
If not, could I push the branch and pull requests?
Thank you
Yours sincerely
dpc commentedon May 3, 2017
@NoSyu - looks like b2 now has "lifetime" settings accessible from a web interface that allow control over how long "hidden" files stick around and when they get deleted.
LinuxOnTheDesktop commentedon Dec 18, 2021
Yes, but even if one uses that GUI to tell b2 to delete files immediately, rclone still manages to treat a deleted file, for a day, as if it were not deleted (!). See #2403.