Problems Versioning differntly named Backup Files

Hello everyone,

I hope you’re all doing well. I could use some assistance with managing Signal backups in my Nextcloud instance.

Currently, I’ve been using the Android Auto-upload feature to store my Signal backups in Nextcloud. However, I’ve run into an issue with the file names containing the date of backup creation, causing my storage space to continuously grow.

I’m looking for a solution to automatically manage these backups to keep only the latest two or three files or impose a folder size limit. I’d prefer a method that automatically deletes older files while retaining the most recent backups. It’s important to note that I don’t want to delete files after a fixed period, such as 14 days, as I want to ensure I have access to recent backups even if i left it unattended for a year.

I’ve looked into the File Versioning app, but it seems to only handle file changes with the same name, which doesn’t fit my needs for managing backup files with different names.

Do you have any suggestions on how I can either rename the backups upon upload to leverage versioning or implement versioning across multiple files to achieve my desired outcome?

Alternatively, if there’s a better practice or solution for managing running backups within Nextcloud, I’m open to exploring that as well.

Any help you can provide would be greatly appreciated. Thanks in advance for your support!

Best regards,

On Linux and other systems, it is the easiest to use a tool that manages such things itself, here you probably look for a solution to do this from Nextcloud side and just let the current function backup everything.

You could use the workflow functionality of Nextcloud. Unfortunately, I haven’t used it a lot by myself, so I can just point you to a few things and let you discover:

You can tag all the uploads automatically that are done by your client. In a second step, you run something that checks all the files with this tag to keep just the two most recent:
not sure if the file actions can do it directly: File actions - Apps - App Store - Nextcloud
or via external scripts:

Thank you for your suggestions and for pointing me towards Nextcloud’s workflow functionality. I’ve already implemented a tagging and x-days-since auto-deletion system within Nextcloud. I’m encountering limitations due to my restricted access to the server, which is managed by Hetzner. Unfortunately, this means I’m unable to utilize file actions or external scripts to enhance automation.

I did attempt to delve deeper into Nextcloud’s workflow capabilities, but I found the documentation to be lacking, which was a bit frustrating. As a workaround, I might explore incorporating some preprocessing using Tasker on Android, but it’s disappointing to encounter barriers to automation within Nextcloud’s workflow without resorting to advanced external scripting. It seemed like such an powerful tool but quickly gets to its limits.

Thank you again for your help and suggestions.