Giter Site home page Giter Site logo

jmsche / dbsaver Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bastien70/dbsaver

0.0 1.0 0.0 1.92 MB

Une application Symfony permettant de gérer et automatiser des backups réguliers de bases de données MySQL.

License: MIT License

PHP 93.73% Twig 6.12% JavaScript 0.15%

dbsaver's Introduction

DbSaver

Package version Build Status License Code coverage

Database list

DbSaver is an application written by Bastien LOUGHIN allowing you to make automatic daily backups (and manual backups) for your MySQL databases. All you have to do is fill the credentials to access the databases, configure a CRON job... and it's done. Passwords will be automatically hashed.

Then, using DbSaver, you can access your databases backups by browsing the Backups tab.

You can then use DbSaver to access databases backups by going to the Backups tab. Backups can be saved locally or in S3 cloud (AWS, Scaleway, ...).

/!\ DbSaver only backups databases. Files (like image uploads) are not saved.

Table of contents

  1. Prerequisites
  2. Manual install
  3. Install using Task
  4. Configure the CRON job
  5. Use the application
    1. Login
    2. Manage storage spaces
    3. Manage databases
    4. Manage backups
  6. Update the application
  7. License
  8. Contribute
  9. Changelog

Prerequisites

  • PHP 8.1+
  • Composer
  • Symfony CLI (if you want to run the project locally)

Manual install

  1. git clone https://github.com/bastien70/dbsaver.git
  2. cd dbsaver
  3. composer install --optimize-autoloader (install dependencies)
  4. php bin/console app:post-install (project configuration)
  5. php bin/console app:regenerate-app-secret (regenerate the secret key allowing to hash databases passwords)
  6. php bin/console d:d:c (create database)
  7. php bin/console d:m:m -n (migrate tables)
  8. php bin/console app:make-user (create your account)

Install using Task

Requires Symfony CLI and Task to be installed.

  1. git clone https://github.com/bastien70/dbsaver.git
  2. cd dbsaver
  3. task install
  4. If you want to run Docker containers (currently only for local emails with MailCatcher): task docker-start et task docker-stop (requires Docker and Docker Compose)
  5. To start the server: task start (to stop it: task stop)

Configure the CRON job

Configure the CRON task allows you to activate the verification of backups to be made. Set it up to run every day.

When you add databases, you can each time configure the periodicity of the backups to be made. The CRON task will automatically fetch the databases that need to be backed up and perform the automatic backup.

Here is the command to run: php bin/console app:backup

Initialize a CRON job on your server or computer:

[path to php] [path to project root]/bin/console app:backup

Use the application

After deploying the application on your server (or launching it locally) access the login page. For the example the host will be 127.0.0.1:8000.

Login

Access the app: https://127.0.0.1:8000/login

You'll be asked to log in. Enter your account credentials (that you created using the php bin/console app:make-user command).

Authentication

You will be redirected to https://127.0.0.1:8000/

Homepage

Manage storage spaces

To create a storage space (locally or using S3), click on the Storage spaces tab then on the one you want. Then click on Add storage space. Fill in the information for your storage space and validate.

Add storage space

You will find this storage space in the list.

Storage space list

Manage databases

To create a database, click the Databases tab, then the Add a database button. Fill your database information.

Then, check the backup options to your needs.

Finally, configure the periodicity at which a backup must be executed for your database (example: every day, every 2 weeks, every 3 months, ...)

Add a database

Then, for every database you add, you will be able to see its backups, update its credentials, delete the database from the app (and its backups) or launch a manual backup.

Database list

Manage backups

To access your databases backups, click the Backups tab.

Backup list

You will be able to download, restore or delete a backup.

Update the application

If you have Task and Symfony CLI installed, just run this command: task update

Else run the following commands instead:

git pull --rebase
composer install --optimize-autoloader
php bin/console doctrine:migrations:migrate --no-interaction
php bin/console app:post-install --only-missing

License

This application is protected by a MIT license: LICENCE.

Contribute

Before making a pull request, don't forget to run these commands (requires Task and Docker Compose):

task ci
task test

Note: you can run these commands without Task, have a look to the Taskfile.yaml file to see which commands will run.

Changelog

See the changelog.

dbsaver's People

Contributors

bastien70 avatar jmsche avatar toshy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.