Skip to content
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

Add Automatic Local Backup Options with Configurable Storage and Scheduling #268

Open
enrique-lozano opened this issue Dec 15, 2024 Discussed in #257 · 7 comments
Open
Labels
type: enhancement New feature or request

Comments

@enrique-lozano
Copy link
Owner

enrique-lozano commented Dec 15, 2024

Problem

Currently, users can only create backups manually, which may lead to missed backups or data loss if the process is forgotten.

Proposed Solution

Introduce an automatic backup feature with the following options:

  • Backup Scheduling: Allow users to set backups to occur automatically at intervals such as "daily", "weekly", "monthly." or directly "on app exit".
  • Custom Backup Location: Provide users with the ability to define a specific folder for storing backups instead of defaulting to the Downloads folder.

The UI in the "More" tab and in the "Settings" page may be altered by this new functionality. We will have to study carefully how to fit this new automatic backup functionality with the existing one that allows the user to save a backup at any time.

Defining a good UI for this case seems to me perhaps one of the most complex tasks. I think we can look at Bluecoins here, which offers exactly the same functionalities that we want to implement sooner or later. It has a button to download a backup on the fly (which we already have), another menu to configure automatic local backups (what we want now) and another menu to configure cloud backups (what we want in the future).

The CSV backups should remain outside of this new features since this type of exports are something that you would typically do manually from time to time.

Next Steps

Eventually we should add support for cloud backups, as discussed in #269, while maintaining local backup options for users who prefer offline solutions. This way, nothing done in this task should be affected by the implementation of #269 (except perhaps some UI changes)


Discussed in #257

@enrique-lozano enrique-lozano added the type: enhancement New feature or request label Dec 15, 2024
@victor-marino
Copy link

victor-marino commented Dec 25, 2024

Hi!

I've been working a bit on this and just wanted to show a basic draft of a proposal for the UI. Let me know what you think!

Things to note:

  • In the (manual) export menu, I'm thinking perhaps it's best to remove the text field with the destination folder, and just ask the user every time they press the "Export" button. It's going to be a manual action anyway, so it doesn't really need persistence, and I think it may create confusion once the automatic backups are added.
  • In the automatic backups option, I thought it could be useful if we could try to do a kind of "rolling backup", where we delete older backups after creating new ones (e.g.: keep the last 3 backups, delete older ones). Otherwise we will eventually clutter the user's storage if he performs frequent backups. Not sure how hard it would be to implement this though, as we'd probably need to identify the old backups by filename. But I've added the UI for it just in case.
data_menu export_menu automatic_backups_off automatic_backups_on autodelete_old_backups_on

@enrique-lozano
Copy link
Owner Author

enrique-lozano commented Dec 26, 2024

Hello @victor-marino! Thank you very much for the progress! I will answer you point by point:

1 - Yes, absolutely. When clicking on the export button, the user should be given the option to choose the destination directly, it makes no sense to add a previous option or persist any information. You can take a look at how Bluecoins does it, the idea would be to implement the same thing. In any case, this could be part of another task since it has nothing to do with auto-backups.
2 - Wow! Very good work here! I really like the design and the option to only leave the last N backups. As a suggestion, I would say that the third screenshot shows a very empty screen, perhaps I would show the fields of the next screenshot but disabled. Apart from that, very very good work! I really like the UI! Now only the best part is missing, making it work 🙂

The "rolling backup" functionality should not be difficult, we just have to make sure that the backups are created with a name complex enough so that we do not delete/overwrite other user files. In any case, we should warn the user in some way so that he does not change the name of the backups files, since this would ruin this functionality.

Thank you very much! Good work!

PS: For the next time, try to upload all the screenshots in English, so that the rest of the people can also read them well!

@victor-marino
Copy link

victor-marino commented Dec 26, 2024

Thanks! Agreed in all your points.

Regarding screen 3, I was thinking... perhaps we can improve the layout a bit.

What if we update screen #1 ("Data") to include 3 different tile list items under the "Export" section:

  • Export data (already there)
  • Local backups
  • Cloud backups (in the future)

In the last two items, we could already show their status with something like "Active" (in green) "Not active" (black) in the subtitle:

backup_status

This way, once the user taps in each of the options, we can show all the corresponding settings for that kind of backup without the need to hide or disable anything, as the screen will be dedicated to that kind of backup only.

What do you think?

@enrique-lozano
Copy link
Owner Author

Hi @victor-marino! Yes, I like the idea, looks good for me 🚀

@victor-marino
Copy link

Hey there!

Sorry for the absence of updates, was really busy lately. I think I should have some time to work on Monekin over the next few weeks.

If you agree, I think the first logical step (and the easiest to implement) is to simply allow the user to choose the folder where they want to save the existing (manual) backups. Once that's in place we can start working on the scheduling.

I will submit a PR for this shortly!

@enrique-lozano
Copy link
Owner Author

Agree! We can merge the PR with this functionality as this is completely independent from the other part

@victor-marino
Copy link

Great, just submitted the PR: #302

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants