taymaz/mediabackup

backup server or website media php package

1.0.1 2023-02-05 17:25 UTC

This package is auto-updated.

Last update: 2024-04-11 20:32:32 UTC


README

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