bastien70 / dbsaver Goto Github PK
View Code? Open in Web Editor NEWA Symfony application for managing and automating regular backups of MySQL databases.
License: MIT License
A Symfony application for managing and automating regular backups of MySQL databases.
License: MIT License
Hey @bastien70 & @jmsche 👋
I like the idea and setup of this bundle, so I would like to know if you are open to having a docker image for it?
Even though I'm kind of new to making images myself, I've already started working on it, so if you are interested I'd love to create a PR and hear your feedback.
Request
Flysystem is a popular and actively maintained library (in contrast to Gaufrette), and is also being used in SymfonyCasts tutorials. I think making the switch to Flysystem is not a drastic change and it would probably be more attractive for other potential/future users.
Additional information
Hi,
Considering the backups are accessible online, are you planning to add 2FA?
The way to manage the privileges of admins and users does not seem the best.
Ideally in the future what we need:
Users and Admins can create storages, databases, backups (write/read)
Only admins can create users.
Admins and users can access all databases and backups without restrictions since it is internal to the company or the freelancer.
According to the (current) README:
Vous aurez la possibilité de supprimer ou télécharger un Backup.
Meaning:
You will be able to download or delete a backup.
But AFAICT the delete
action is currently disabled in the Backup crud controller.
Allow the user to restore a backup
Problem
The max backups option does not remove the oldest backups when it reaches it specified value, but it removes the most recently created one.
Reproduce
5
.5
manual backups and check if this is correctly inserted in the database.
3. Now make another backup (nr. 6
) and check the database again.
No new backup seems to be created and the same backups are still present.
Now, if you set the max backups option for the database to 6
, and then create a new backup, the following happens:
It inserted a new backup, but with ID 7.
Conclusion
Apparently the check with max backups is done in the clean
method, which is the root problem of this issue. The implementation with the looping over the backups is incorrect, as it causes the removal of the most recent backup right after creation, which explains the initially strange jump in ID after increasing max backups option.
Possible solution
Adding a method to the BackupRepository
with custom querybuilder for selecting the backups to be removed, and then delete them in the current clean
method. Or maybe doctrine collection matching could come in handy here. Many different solutions possible.
Using Mysqldump, we can provide a whole bunch of options to customize what we want and don't want to keep on sql files.
An interesting feature would be, when adding a database, to offer the options to use for backups
The user should be able to configure the upload destination from the dashboard.
Perhaps users would like one database to be backed up every week, and another every day or month.
Currently, the user himself configures a single CRON task with a certain periodicity which will be the same for all databases.
Instead, we could indicate to the user to configure a CRON task which will be executed every day and which will check if there are databases to backup, according to the requested periodicity.
Request
Currently database backups are created directly on request, which is blocking. Instead it could be handled more gracefully by using Messenger. So instead of directly creating a backup on the button click, we'll dispatch a message containing the information needed to create the backup (e.g. a Database
entity), and then let the worker handle that job.
Additional information
symfony/messenger
to be added in composer.MESSENGER_TRANSPORT_DSN
to be set by the user.Add a command to switch between AWS S3 and local storage
An interesting idea in my opinion would be to offer the possibility to users to restore a backup from a .SQL file to import.
A typical case (and one I've encountered) would be when developing a web application. We have the application in production, and in preproduction. Sometimes we need to transfer the database from prod to preprod. This is where I think DbSaver might be able to do this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.