Skip to content

LDTorres/Database-Backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Database Backup - Restore

Php class with 4 functions.

First

You have to change the bd_model.php Config.

private $path = ""; // Example: app/lib/backups/
private $aplication = ''; // Name of your aplication
private $description = ''; // Description of your database

// Conection
private $database = '';
private $user = 'user';
private $host = 'localhost';
private $pass = '';

Backup

$m = new BDModel();
$result = $m->backup();

This will return an array with the route

Restore

This function wait for a param filename

$m = new BDModel('filename');
$result = $m->restore();

This will return an mensage

Delete

This function will delete a backup Wait for a param filename

$m = new BDModel();
$result = $m->delete('filename');

Will return an mensage

Backups

This function will return all backups

$m = new BDModel();
$result = $m->getBackups();

About

Un conjunto de funciones para respaldar / restaurar tu base de datos

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages