Skip to content

danilocgsilva/Backupphp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Backupphp

Generates a sql backup entirely by php code

Install

composer require danilocgsilva/backupphp

Usage

Once you've installed the package in your project, just call:

\Danilocgsilva\Backupphp::backup('mysql_host', 'mysql_user', 'database_name', 'password', 'full_server_path_to_store_sql_files', (optional)'database_prefix', (optional)'database_encoding');

Security Notice

There's no security checkings after the backup method is called! It was thought out to serve as an api function, so after entering the parameters in the backup() method, you must make your own security filtering.

Where it was already successfully tested

  1. Recovering a basic WordPress database.
  2. Recovering a 60mb database serving several system, including some wordpresses and drupal installations. Not tested the systems after restoring, but that was no error on restoring.

ToDo

Provides a csrf_token to put some security in html forms.

About

Generates a sql backup entirely by php code

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages