Skip to content

Latest commit

 

History

History
60 lines (45 loc) · 1.77 KB

README.md

File metadata and controls

60 lines (45 loc) · 1.77 KB

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

screenshot

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