index.php 491 B

123456789101112131415161718192021
  1. <?php
  2. use function Hestiacp\quoteshellarg\quoteshellarg;
  3. ob_start();
  4. include $_SERVER["DOCUMENT_ROOT"] . "/inc/main.php";
  5. // Check token
  6. verify_csrf($_GET);
  7. if (empty($_GET["object"])) {
  8. $_GET["object"] = "";
  9. }
  10. exec(HESTIA_CMD . "v-schedule-user-backup-restic " . $user, $output, $return_var);
  11. if ($return_var == 0) {
  12. $_SESSION["error_msg"] = _("Snapshot has been sheduled");
  13. } else {
  14. $_SESSION["error_msg"] = implode("\n", $output);
  15. }
  16. header("Location: /list/backup/incremental/");