<?php
if ($_POST){
$nap=stripslashes($_POST['nap']);
exec ("find /var/www/ize -not -name \"backup_*\" -a -not -name \"backup.php\" -a -not -name \"*.zip\" -a -not -name \"error.log\" -a -not -path \"*/zend*\" -a -not -path \"*tmp/*\" -a -not -path \"*images/*\" -a -not -path \"*fotok*\" -type f -mtime -$nap > lista");
$fajl = "backup_".`date +%F_%H%M`.".tar.gz";
$output = `tar -cvzf /var/www/ize/backup_\`date +%F_%H%M\`.tar.gz --files-from lista`;
echo "DONE!";
echo "<a href=\"$fajl\">backup</a>";
echo "<pre>$output</pre>";
} else {
?>
<form action="backup.php" method="post">
file age limit to be backuped ?
<input type="text" name="nap" id="nap" cols="2" rows="1">
<button class="button" type="submit">GO</button>
</form>
<?php }; ?>
Nincsenek megjegyzések:
Megjegyzés küldése