taymaz / mediabackup
backup server or website media php package
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:libary
Requires
Requires (Dev)
- phpunit/phpunit: 9.5
This package is auto-updated.
Last update: 2024-11-11 21:35:26 UTC
README
mediaBackup
backup php package
backup server or website media php package
Install
From your terminal:
composer require taymaz/mediabackup
This starts to install mediabackup package its working with composer so you can use it to easy.
Basic use
for starting you need to create a file named config to setup backup options like directories and backup export path and ...
First create your config file like this
Set your own particular config
{ "Directories": [ "media", ".", "media/thumbnails" ], "BackupExportPath": "." }
then require package
require package in your php file
use Taymaz\Mediabackup\Mediabackup;
and give config file path then get your backup file path in clallback function
Mediabackup::configFile("./config.json")->CreateBackup(function($backup){ echo $backup->path; });
its done your backup is ready
$backup
methodes you can use :
$backup->remove(); //true $backup->filename; //backup-2023-01-15.zip