Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 13.59.1.58
Current Path : /var/www/html/oums/src/ |
| Current File : /var/www/html/oums/src/backup_data.php |
<?php
include("sys_session.php");
include("sys_mainphp.php");
include("sys_connect.php");
$resp_mesg = "";
$resp_stat = "";
$resp_file = "";
$data_host = "logisys.cluster-cv9maxyrxjgg.ap-south-1.rds.amazonaws.com";
$data_user = "rcubuser";
$data_pass = "rcubuser@124";
$backup_file = 'office_logisys3_oums_'.date("Y-m-d").'.gz';
$command = "mysqldump --opt -h ".$data_host." --user ".$data_user." --password=".$data_pass." logisys3_oums | gzip >". $backup_file;
exec($command);
$backup_zip="office_logisys3_oums_".date("Y-m-d");
$command = "zip ".$backup_zip." office_*".date("Y-m-d").'.gz';
exec($command);
$command = "rm office_*".date("Y-m-d").'.gz';
exec($command);
$resp_file=$backup_zip.'.zip';
echo json_encode(array("mesg"=>$resp_mesg, "stat"=>$resp_stat, "file"=>$resp_file));
?>
|