A Symfony application for managing and automating regular backups of MySQL databases.

Related tags

Database dbsaver
Overview

DbSaver

Package version Build Status License Code coverage

Alt text

DbSaver is an application written by Bastien LOUGHIN allowing you to make automatic daily backups (and manual backups) for your MySQL databases.

Documentation

See docs/english.md for English docs or docs/french.md for French docs.

Comments
  • Feature/add docker image

    Feature/add docker image

    #59

    WIP

    • Add initial Dockerfile + .dockerignore
    • Add documentation for docker compose
    • Updated docker-compose to V2 variant docker compose
    • CI through docker compose (untested)
    • CI push docker image to dockerhub on release (untested)
    opened by ToshY 25
  • Major changes : User can now configure storage spaces from Dashboard

    Major changes : User can now configure storage spaces from Dashboard

    BREAKING CHANGES

    1. Removed vichuploader + knpgaufrette to use flysystem

    2. The user can now configure the storage spaces (adapters) for his backups from the dashboard. It can currently configure a local adapter, or for S3 (AWS, Scaleway, ...) For each database, he can choose which adapter to use.

    enhancement need review 
    opened by bastien70 16
  • Added commands to switch storage provider

    Added commands to switch storage provider

    See #51

    • Command to manually switch to local storage mode
    • Command to manually switch to AWS S3 storage mode
    • Storage type initialization at installation
    enhancement 
    opened by bastien70 8
  • Improvements

    Improvements

    • Taskfile: user docker compose plugin instead of docker-compose
    • Upgrade Symfony to 6.1.5 & other vendors
    • Fix code style after php-cs-fixer upgrade
    • Fix code & tests after EasyAdmin upgrade
    opened by jmsche 5
  • [Feature] Add messenger for creating backups

    [Feature] Add messenger for creating backups

    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

    • This would require symfony/messenger to be added in composer.
    • An additional environment variable MESSENGER_TRANSPORT_DSN to be set by the user.
    • Additional information / links need to be supplied in docs on how to set up the workers to execute the jobs.
    opened by ToshY 5
  • [Feature] Add docker image

    [Feature] Add docker image

    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.

    enhancement 
    opened by ToshY 3
  • Given the same permissions between users and admins

    Given the same permissions between users and admins

    See #64

    From now on, each user can access the databases and backups of any other user.

    Moreover, there is no logic in the databases created being relative to each user since the application is supposed to help companies (and/or freelancers) to manage their databases, so you might as well centralize everything.

    enhancement 
    opened by bastien70 2
  • [Feature] Add an option for backups periodicity

    [Feature] Add an option for backups periodicity

    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.

    opened by bastien70 2
  • [Bug] Max backups option does not remove oldest backup but newest

    [Bug] Max backups option does not remove oldest backup but newest

    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

    1. Create a database and set max backups to for example 5.
    2. Make 5 manual backups and check if this is correctly inserted in the database.

    image 3. Now make another backup (nr. 6) and check the database again.

    image

    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:

    image

    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.

    bug 
    opened by ToshY 2
  • Added backup restoration support

    Added backup restoration support

    See #75

    I updated CI to use mariadb from the docker-compose.test instead of a fresh mysql service. In this way, it allows me not to have to duplicate the procedure carried out in the docker-compose (which here forced me to create a test database and import SQL into it)

    Also, I updated the used version of Ubuntu to the latest one. If that's a problem, I'll do that in a separate PR.

    enhancement 
    opened by bastien70 1
  • [Feature] Replace Gaufrette with Flysystem

    [Feature] Replace Gaufrette with Flysystem

    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

    opened by ToshY 1
Releases(2.2.0)
  • 2.2.0(Nov 2, 2022)

    New features:

    • Added backup restoration support
    • Added double authentication support

    Updates:

    • Upgraded Symfony to 6.1.7
    • Upgraded vendors

    Improvements:

    • Fixed code style after php-cs-fixer upgrade
    • Fixed code & tests after EasyAdmin upgrade
    • Taskfile: user docker compose plugin instead of docker-compose
    • Test CI against PHP 8.2 & upgrade actions
    • Docker compose: add MariaDB & minio images to dev environment

    For details of changes, please refer to CHANGELOG.MD

    Source code(tar.gz)
    Source code(zip)
  • 2.1.0(Sep 13, 2022)

  • 2.0.0(Aug 16, 2022)

    New features:

    • Updated code to PHP 8.1
    • Updated code to Symfony 6.1
    • Added backups options when creating new database
    • Added custom backup periodicity for each database
    • User can now configure directly from his dashboard the places where the backups are sent, and this, for each database
    • Added "remember me" checkbox on login
    • Allow user to receive or not automatic emails
    • Allow choosing app environment during post-install

    Fixes:

    • Updated homepage
    • Users and admins now have the same permissions, except that only admins can create accounts
    • Removed French documentation
    • Fixed the query that searches for backups to delete
    • Switched Alice fixtures to Foundry
    • Increased Phpstan level to 6

    For details of changes, please refer to CHANGELOG.MD

    Source code(tar.gz)
    Source code(zip)
  • 1.2.0(Sep 6, 2021)

    New features:

    • Support reset password
    • User: add locale & allow them to control their settings
    • User : allow to update password
    • Send notification emails after backups
    • Added database connection status
    • Allow to test database connection
    • Allow to manually remove a backup

    Fixes:

    • Cleanup vendors
    • Add docs about updating the application
    • Send email in user's locale
    • PostInstall command: add an option to only ask for missing params
    • Docs refactor
    • Remove unused constant
    • Notification email: customize title & footer, use Mailer
    • Post install command: offer existing values when running command again
    • Improvement of the CRUD Database index
    • Use Docker for local tests
    • Change main path from "/dbsaver" to "/"
    • Test entities & improve Backup controller tests
    • Fix license in composer.json
    • Improve forms
    • Make tests use .env.test.local instead of .env.local

    For details of changes, please refer to CHANGELOG.MD

    Source code(tar.gz)
    Source code(zip)
  • 1.1.0(Aug 24, 2021)

    New features :

    • Support for user management. You can now create accounts which will each have access to their own databases and backups
    • English language added

    Fixes :

    • Tests
    • Code optimization tools
    • Adding an automatic installation with Task

    For details of changes, please refer to CHANGELOG.MD

    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Aug 18, 2021)

    New features:

    • Ability to add MySQL databases to save
    • Put a maximum number of backups to keep in memory
    • CRON task to launch automatic backups
    • Start a manual backup
    • Download / delete a backup
    • Store backups locally or on AWS S3

    For details of changes, please refer to CHANGELOG.MD

    Source code(tar.gz)
    Source code(zip)
Owner
Bastien
Développeur Symfony en freelance ayant une certaine passion pour l'automatisation de tout et n'importe quoi
Bastien
This package provides a framework-agnostic database backup manager for dumping to and restoring databases from S3, Dropbox, FTP, SFTP, and Rackspace Cloud

Database Backup Manager This package provides a framework-agnostic database backup manager for dumping to and restoring databases from S3, Dropbox, FT

Backup Manager 1.6k Dec 23, 2022
ATK Data - Data Access Framework for high-latency databases (Cloud SQL/NoSQL).

ATK Data - Data Model Abstraction for Agile Toolkit Agile Toolkit is a Low Code framework written in PHP. Agile UI implement server side rendering eng

Agile Toolkit 257 Dec 29, 2022
You can sync any number of PDO supported databases

Features: Can backup any number of databases. No need to introduce column name only table name The Last id based data backup Support 12 different data

Tharusha Kavishan Udumulla 4 Aug 27, 2021
A php class for managing and connecting to a database

Query builder class php This class is responsible for creating and executing sql commands and helps you to execute as easily as possible and safely. I

Mohammad Qasemi 39 Dec 11, 2022
A simple library for managing database connections, results pagination and building queries in PHP

PHP lions-software-database-manager This is a simple library for managing database connections, results pagination and building queries in PHP. Esta é

Lions Software 0 Feb 7, 2022
Symfony 5.2 + api platform project with ELK stack + elastic FileBeats for the log management. All running in 7 docker containers: nginx, php 8, mysql, elastic search, logstash, kibana, fileBeats.

Symfony with ELK and Elastic FileBeats Stack Prerequisites: Make sure that docker and docker-compose are installed in your machine and available for y

null 13 May 20, 2022
TO DO LIST WITH LOGIN AND SIGN UP and LOGOUT using PHP and MySQL please do edit the _dbconnect.php before viewing the website.

TO-DO-LIST-WITH-LOGIN-AND-SIGN-UP TO DO LIST WITH LOGIN AND SIGN UP and LOGOUT using PHP and MySQL please do edit the _dbconnect.php before viewing th

Aniket Singh 2 Sep 28, 2021
A simple and extensible fixture loader for PHP 7.3+, supporting SQLite and MySQL

Flowder Flowder is a (really) simple fixture loader for PHP 7.3+, supporting SQLite and MySQL. Using Flowder in PHP 7.2 or below? Try version 1 instea

Joe Haines 6 Jan 17, 2021
Connect and work with MySQL/MariaDB database through MySQLi in PHP. This is an introductory project, If you need a simple and straightforward example that takes you straight to the point, you can check out these examples.

First MySQLi PHP Connect and work with MySQL/MariaDB database through MySQLi in PHP. The above exercises are designed for students. This is an introdu

Max Base 4 Feb 22, 2022
Staggered import of large and very large MySQL Dumps even through the web servers with hard runtime limit and those in safe mode.

Staggered import of large and very large MySQL Dumps (like phpMyAdmin dumps) even through the web servers with hard runtime limit and those in safe mode. | Persian Translation Version

Amir Shokri 5 Jan 8, 2022
Independent query builders for MySQL, PostgreSQL, SQLite, and Microsoft SQL Server.

Aura.SqlQuery Provides query builders for MySQL, Postgres, SQLite, and Microsoft SQL Server. These builders are independent of any particular database

Aura for PHP 424 Dec 12, 2022
A web interface for MySQL and MariaDB

phpMyAdmin A web interface for MySQL and MariaDB. https://www.phpmyadmin.net/ Code status Download You can get the newest release at https://www.phpmy

phpMyAdmin 6.4k Jan 5, 2023
A validating SQL lexer and parser with a focus on MySQL dialect.

SQL Parser A validating SQL lexer and parser with a focus on MySQL dialect. Code status Installation Please use Composer to install: composer require

phpMyAdmin 368 Dec 27, 2022
A simple PHP and MySQL based internet forum that displays the messages in classical threaded view (tree structure)

my little forum my little forum is a simple PHP and MySQL based internet forum that displays the messages in classical threaded view (tree structure).

Mark Hoschek 97 Dec 29, 2022
Very easy to use PDO MYSQL API. Just Include in PHP file and get it working.

CRUD-MYSQL-API Very easy to use PDO MYSQL API. Just Include in PHP file and get it working. INSTALATION Step 1: git clone https://github.com/arhex-lab

Abdul Raheem 4 Jun 14, 2022
Tiny php mysql lib (PDO-based) with handy fetch/update functionality, supports both SQL and parametric queries

Micro PHP mysql lib (~ 200 lines of code) with ultra powerful CRUD for faster than ever development: parametric fetch/insert/update/delete (based on a

Mr Crypster 18 Dec 10, 2022
A simple program to query mysql data and display the queried data in JSON format

A simple program to query mysql data and display the queried data in JSON format. The data displayed in JSON format will change and update as the data in your mysql database changes.

null 2 Mar 7, 2022
The Enobrev\ORM library is a small framework of classes meant to be used for simply mapping a mysql database to PHP classes, and for creating simply SQL statements using those classes.

The Enobrev\ORM library is a small framework of classes meant to be used for simply mapping a mysql database to PHP classes, and for creating simply SQL statements using those classes.

Mark Armendariz 0 Jan 7, 2022
PHP version of mysqldump cli that comes with MySQL

MySQLDump - PHP Requirements | Installing | Getting started | API | Settings | PDO Settings | TODO | License | Credits This is a php version of mysqld

diego torres 1.1k Jan 8, 2023