Merge branch 'master' into 'master'
Master
Added possibility to delete backups manually
See merge request !246
| | |
| | | $server_id = $this->form->dataRecord['server_id']; |
| | | $backup = $app->db->queryOneRecord("SELECT * FROM web_backup WHERE backup_id = ?", $backup_id); |
| | | if($backup['server_id'] > 0) $server_id = $backup['server_id']; |
| | | $sql = "SELECT count(action_id) as number FROM sys_remoteaction WHERE action_state = 'pending' AND action_type = 'backup_restore' AND action_param = '$backup_id'"; |
| | | $tmp = $app->db->queryOneRecord($sql); |
| | | $sql = "SELECT count(action_id) as number FROM sys_remoteaction WHERE action_state = 'pending' AND action_type = 'backup_restore' AND action_param = ?"; |
| | | $tmp = $app->db->queryOneRecord($sql, $backup_id); |
| | | if($tmp['number'] == 0) { |
| | | $message .= $wb['restore_info_txt']; |
| | | $sql = "INSERT INTO sys_remoteaction (server_id, tstamp, action_type, action_param, action_state, response) " . |
| | |
| | | $error .= $wb['restore_pending_txt']; |
| | | } |
| | | } |
| | | if($_GET['backup_action'] == 'delete' && $backup_id > 0) { |
| | | $server_id = $this->form->dataRecord['server_id']; |
| | | $backup = $app->db->queryOneRecord("SELECT * FROM web_backup WHERE backup_id = ?", $backup_id); |
| | | if($backup['server_id'] > 0) $server_id = $backup['server_id']; |
| | | $sql = "SELECT count(action_id) as number FROM sys_remoteaction WHERE action_state = 'pending' AND action_type = 'backup_delete' AND action_param = ?"; |
| | | $tmp = $app->db->queryOneRecord($sql, $backup_id); |
| | | if($tmp['number'] == 0) { |
| | | $message .= $wb['delete_info_txt']; |
| | | $sql = "INSERT INTO sys_remoteaction (server_id, tstamp, action_type, action_param, action_state, response) " . |
| | | "VALUES (?, UNIX_TIMESTAMP(), 'backup_delete', ?, 'pending', '')"; |
| | | $app->db->query($sql, $server_id, $backup_id); |
| | | } else { |
| | | $error .= $wb['delete_pending_txt']; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | if($tmp['number'] == 0) { |
| | | $message .= $wb['restore_info_txt']; |
| | | $sql = "INSERT INTO sys_remoteaction (server_id, tstamp, action_type, action_param, action_state, response) " . |
| | | "VALUES (?, ? 'backup_restore_mail', ?, 'pending','')"; |
| | | "VALUES (?, ?, 'backup_restore_mail', ?, 'pending','')"; |
| | | $app->db->query($sql, $this->form->dataRecord['server_id'], time(), $backup_id); |
| | | } else { |
| | | $error .= $wb['restore_pending_txt']; |
| | | } |
| | | } |
| | | |
| | | if($_GET['backup_action'] == 'delete_mail' && $backup_id > 0) { |
| | | $sql = "SELECT count(action_id) as number FROM sys_remoteaction WHERE action_state = 'pending' AND action_type = 'backup_delete_mail' AND action_param = '$backup_id'"; |
| | | $tmp = $app->db->queryOneRecord($sql); |
| | | if($tmp['number'] == 0) { |
| | | $message .= $wb['delete_info_txt']; |
| | | $sql = "INSERT INTO sys_remoteaction (server_id, tstamp, action_type, action_param, action_state, response) " . |
| | | "VALUES (?, ?, 'backup_delete_mail, ?, 'pending', '')"; |
| | | $app->db->query($sql, $this->form->dataRecord['server_id'], time(), $backup_id); |
| | | } else { |
| | | $error .= $wb['delete_pending_txt']; |
| | | } |
| | | } |
| | | } |
| | | |
| | | //* Get the data |
| | |
| | | return false; |
| | | } |
| | | |
| | | if (/*$action_type != 'backup_download_mail' and*/ $action_type != 'backup_restore_mail') { |
| | | if (/*$action_type != 'backup_download_mail' and*/ $action_type != 'backup_restore_mail' and $action_type != 'backup_delete_mail') { |
| | | $this->server->fault('invalid_action', "Invalid action_type $action_type"); |
| | | return false; |
| | | } |
| | |
| | | return false; |
| | | } |
| | | |
| | | if ($action_type != 'backup_download' and $action_type != 'backup_restore') { |
| | | if ($action_type != 'backup_download' and $action_type != 'backup_restore' and $action_type != 'backup_delete') { |
| | | $this->server->fault('invalid_action', "Invalid action_type $action_type"); |
| | | return false; |
| | | } |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring may overwrite existing files in your mailbox. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['filesize_txt'] = 'Filesize'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring may overwrite existing files in your mailbox. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['filesize_txt'] = 'Filesize'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring may overwrite existing files in your mailbox. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['filesize_txt'] = 'Filesize'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring may overwrite existing files in your mailbox. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['filesize_txt'] = 'Filesize'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring may overwrite existing files in your mailbox. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['filesize_txt'] = 'Filesize'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring may overwrite existing files in your mailbox. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['filesize_txt'] = 'Filesize'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring may overwrite existing files in your mailbox. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['filesize_txt'] = 'Filesize'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring may overwrite existing files in your mailbox. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['filesize_txt'] = 'Filesize'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring may overwrite existing files in your mailbox. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['filesize_txt'] = 'Filesize'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring may overwrite existing files in your mailbox. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['filesize_txt'] = 'Filesize'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring may overwrite existing files in your mailbox. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['filesize_txt'] = 'Filesize'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring may overwrite existing files in your mailbox. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['filesize_txt'] = 'Filesize'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring may overwrite existing files in your mailbox. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['filesize_txt'] = 'Filesize'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring may overwrite existing files in your mailbox. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['filesize_txt'] = 'Filesize'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring may overwrite existing files in your mailbox. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['filesize_txt'] = 'Filesize'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring may overwrite existing files in your mailbox. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['filesize_txt'] = 'Filesize'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring may overwrite existing files in your mailbox. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['filesize_txt'] = 'Filesize'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring may overwrite existing files in your mailbox. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['filesize_txt'] = 'Filesize'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring may overwrite existing files in your mailbox. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['filesize_txt'] = 'Filesize'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring may overwrite existing files in your mailbox. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['filesize_txt'] = 'Filesize'; |
| | | ?> |
| | |
| | | <td class="text-right"> |
| | | <div class="buttons"> |
| | | <button class="btn btn-default formbutton-default" type="button" onclick="ISPConfig.confirm_action('mail/mail_user_edit.php?id={tmpl_var name='parent_id'}&next_tab=backup&backup_action=restore_mail&backup_id={tmpl_var name='backup_id'}','{tmpl_var name='restore_confirm_txt'}');">{tmpl_var name="restore_backup_txt"}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" onclick="ISPConfig.confirm_action('mail/mail_user_edit.php?id={tmpl_var name='parent_id'}&next_tab=backup&backup_action=delete_mail&backup_id={tmpl_var name='backup_id'}','{tmpl_var name='delete_confirm_txt'}');">{tmpl_var name="delete_backup_txt"}</button> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring will overwrite existing files in your website. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['backup_type_mysql'] = 'MySQL Database'; |
| | | $wb['backup_type_web'] = 'Website files'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring will overwrite existing files in your website. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['backup_type_mysql'] = 'MySQL Database'; |
| | | $wb['backup_type_web'] = 'Website files'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring will overwrite existing files in your website. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['backup_type_mysql'] = 'MySQL Database'; |
| | | $wb['backup_type_web'] = 'Website files'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Obnovení přepíše existující soubory na Vaší webové stránce. Opravdu chcete obnovit tuto zálohu ?'; |
| | | $wb['download_pending_txt'] = 'Shodný požadavek na vytvoření zálohy pro stažení již čeká ve frontě na serveru ke zpracování.'; |
| | | $wb['restore_pending_txt'] = 'Shodný požadavek na obnovu dat ze zálohy již čeká ve frontě na serveru ke zpracování.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['backup_type_mysql'] = 'MySQL Databáze'; |
| | | $wb['backup_type_web'] = 'Soubory webových stránek'; |
| | | ?> |
| | |
| | | $wb['backup_type_mongodb'] = 'MongoDB Datenbank'; |
| | | $wb['download_pending_txt'] = 'Es liegt bereits ein Backup-Download-Job an.'; |
| | | $wb['restore_pending_txt'] = 'Es liegt bereits ein Backup-Wiederherstellungs-Job an.'; |
| | | $wb['delete_backup_txt'] = 'Backup löschen'; |
| | | $wb['delete_info_txt'] = 'Das Löschen des Backups hat begonnen. Diese Aktion kann bis zur Fertigstellung einige Minuten dauern.'; |
| | | $wb['delete_confirm_txt'] = 'Möchten Sie dieses Backup wirklich löschen?'; |
| | | $wb['delete_pending_txt'] = 'Es liegt bereits ein Backup-Lösch-Job an.'; |
| | | $wb['backup_type_mysql'] = 'MySQL-Datenbank'; |
| | | $wb['backup_type_web'] = 'Webseiten-Dateien'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring will overwrite existing files in your website. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['backup_type_mysql'] = 'MySQL Database'; |
| | | $wb['backup_type_web'] = 'Website files'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring will overwrite existing files in your website. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['backup_type_mongodb'] = 'MongoDB Database'; |
| | | $wb['backup_type_mysql'] = 'MySQL Database'; |
| | | $wb['backup_type_web'] = 'Website files'; |
| | |
| | | <?php |
| | | <<<<<<< HEAD |
| | | $wb['list_head_txt'] = 'Respaldos existentes'; |
| | | $wb['date_txt'] = 'Fecha'; |
| | | $wb['backup_type_txt'] = 'Tipo'; |
| | |
| | | $wb['restore_confirm_txt'] = 'La restauración sobreescribirá los archivos en el sitio web. Realmente desea restaurar este respaldo?'; |
| | | $wb['download_pending_txt'] = 'Ya existe un trabajo pendiente para descarga de respaldo.'; |
| | | $wb['restore_pending_txt'] = 'Ya existe un trabajo pendiente para restauración de respaldo.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['backup_type_mysql'] = 'Base de datos MySQL'; |
| | | $wb['backup_type_web'] = 'Archivos del sitio web'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring will overwrite existing files in your website. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['backup_type_mysql'] = 'MySQL Database'; |
| | | $wb['backup_type_web'] = 'Website files'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring will overwrite existing files in your website. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['backup_type_mysql'] = 'MySQL Database'; |
| | | $wb['backup_type_web'] = 'Website files'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring will overwrite existing files in your website. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['backup_type_mysql'] = 'MySQL Database'; |
| | | $wb['backup_type_web'] = 'Website files'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring will overwrite existing files in your website. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['backup_type_mysql'] = 'MySQL Database'; |
| | | $wb['backup_type_web'] = 'Website files'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring will overwrite existing files in your website. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['backup_type_mysql'] = 'MySQL Database'; |
| | | $wb['backup_type_web'] = 'Website files'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring will overwrite existing files in your website. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['backup_type_mysql'] = 'MySQL Database'; |
| | | $wb['backup_type_web'] = 'Website files'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring will overwrite existing files in your website. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['backup_type_mysql'] = 'MySQL Database'; |
| | | $wb['backup_type_web'] = 'Website files'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring will overwrite existing files in your website. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['backup_type_mysql'] = 'MySQL Database'; |
| | | $wb['backup_type_web'] = 'Website files'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Przywrócenie danych z kopii zapasowej zastąpi wszystkie obecnie istniejące pliki. Czy na pewno chcesz to zrobić?'; |
| | | $wb['download_pending_txt'] = 'Trwa już jedno zadanie pobrania kopii.'; |
| | | $wb['restore_pending_txt'] = 'Trwa już jedno zadanie przywrócenia danych z kopii.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['backup_type_mysql'] = 'Baza MySQL'; |
| | | $wb['backup_type_web'] = 'Pliki strony'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring will overwrite existing files in your website. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['backup_type_mysql'] = 'MySQL Database'; |
| | | $wb['backup_type_web'] = 'Website files'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring will overwrite existing files in your website. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['backup_type_mysql'] = 'MySQL Database'; |
| | | $wb['backup_type_web'] = 'Website files'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring will overwrite existing files in your website. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['backup_type_mysql'] = 'MySQL Database'; |
| | | $wb['backup_type_web'] = 'Website files'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring will overwrite existing files in your website. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['backup_type_mysql'] = 'MySQL-databaser'; |
| | | $wb['backup_type_web'] = 'Webbsidefiler'; |
| | | ?> |
| | |
| | | $wb['restore_confirm_txt'] = 'Restoring will overwrite existing files in your website. Do you really want to restore this backup?'; |
| | | $wb['download_pending_txt'] = 'There is already a pending backup download job.'; |
| | | $wb['restore_pending_txt'] = 'There is already a pending backup restore job.'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['backup_type_mysql'] = 'MySQL Database'; |
| | | $wb['backup_type_web'] = 'Website files'; |
| | | ?> |
| | |
| | | <?php |
| | | <<<<<<< HEAD |
| | | $wb['list_head_txt'] = 'Alınmış Yedekler'; |
| | | $wb['date_txt'] = 'Tarih'; |
| | | $wb['backup_type_txt'] = 'Tip'; |
| | |
| | | $wb['download_pending_txt'] = 'Zaten bekleyen bir yedek indirme işlemi var.'; |
| | | $wb['restore_pending_txt'] = 'Zaten bekleyen bir yedek geri yükleme işlemi var.'; |
| | | $wb['backup_type_mysql'] = 'MySQL Veritabanı'; |
| | | $wb['delete_backup_txt'] = 'Delete Backup'; |
| | | $wb['delete_info_txt'] = 'Delete of the backup has been started. This action takes several minutes to be completed.'; |
| | | $wb['delete_confirm_txt'] = 'Really delete this backup?'; |
| | | $wb['delete_pending_txt'] = 'There is already a pending backup delete job.'; |
| | | $wb['backup_type_web'] = 'Web sitesi dosyaları'; |
| | | |
| | | ?> |
| | |
| | | <tmpl_if name="download_available"> |
| | | <button class="btn btn-default formbutton-default" type="button" data-load-content="sites/web_vhost_domain_edit.php?id={tmpl_var name='parent_id'}&next_tab=backup&backup_action=download&backup_id={tmpl_var name='backup_id'}">{tmpl_var name="download_backup_txt"}</button> |
| | | </tmpl_if> |
| | | <button class="button iconstxt icoDelete" type="button" onclick="confirm_action('sites/web_domain_edit.php?id={tmpl_var name='parent_id'}&next_tab=backup&backup_action=delete&backup_id={tmpl_var name='backup_id'}','{tmpl_var name='delete_confirm_txt'}');"><span>{tmpl_var name="delete_backup_txt"}</span></button> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | |
| | | |
| | | } |
| | | } |
| | | |
| | | // remove non-existing backups from database |
| | | $backups = $app->db->queryAllRecords("SELECT * FROM mail_backup WHERE server_id = ?", $conf['server_id']); |
| | | if(is_array($backups) && !empty($backups)){ |
| | | foreach($backups as $backup){ |
| | | $mail_backup_dir = $backup_dir.'/mail'.$rec['domain_id']; |
| | | $mail_backup_file = 'mail'.$rec['mailuser_id'].'_*'; |
| | | if(!is_file($mail_backup_dir.'/'.$mail_backup_file)){ |
| | | $sql = "DELETE FROM mail_backup WHERE server_id = ? AND parent_domain_id = ? AND filename = ?"; |
| | | $app->db->query($sql, $conf['server_id'], $backup['parent_domain_id'], $backup['filename']); |
| | | if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql); |
| | | } |
| | | } |
| | | } |
| | | if( $server_config['backup_dir_is_mount'] == 'y' ) $app->system->umount_backup_dir($backup_dir); |
| | | //* end run_backups |
| | | } |
| | |
| | | //* Register for actions |
| | | $app->plugins->registerAction('backup_download', $this->plugin_name, 'backup_action'); |
| | | $app->plugins->registerAction('backup_restore', $this->plugin_name, 'backup_action'); |
| | | $app->plugins->registerAction('backup_delete', $this->plugin_name, 'backup_action'); |
| | | //$app->plugins->registerAction('backup_download_mail', $this->plugin_name, 'backup_action_mail'); |
| | | $app->plugins->registerAction('backup_restore_mail', $this->plugin_name, 'backup_action_mail'); |
| | | |
| | | $app->plugins->registerAction('backup_delete_mail', $this->plugin_name, 'backup_action_mail'); |
| | | } |
| | | |
| | | //* Do a backup action |
| | |
| | | } |
| | | $app->system->web_folder_protection($web['document_root'], true); |
| | | } |
| | | |
| | | if($action_name == 'backup_delete') { |
| | | if(file_exists($backup_dir.'/'.$backup['filename']) && !stristr($backup_dir.'/'.$backup['filename'], '..') && !stristr($backup_dir.'/'.$backup['filename'], 'etc')) { |
| | | unlink($backup_dir.'/'.$backup['filename']); |
| | | |
| | | $sql = "DELETE FROM mail_backup WHERE server_id = ? AND parent_domain_id = ? AND filename = ?"; |
| | | $app->db->query($sql, $conf['server_id'], $backup['parent_domain_id'], $backup['filename']); |
| | | if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql); |
| | | $app->log('unlink '.$backup_dir.'/'.$backup['filename'], LOGLEVEL_DEBUG); |
| | | } |
| | | } |
| | | |
| | | if( $server_config['backup_dir_is_mount'] == 'y' ) $app->system->umount_backup_dir($backup_dir); |
| | | } else { |
| | | $app->log('Backup directory not ready.', LOGLEVEL_DEBUG); |
| | |
| | | $backup_id = intval($data); |
| | | $mail_backup = $app->dbmaster->queryOneRecord("SELECT * FROM mail_backup WHERE backup_id = ?", $backup_id); |
| | | |
| | | if (is_array($mail_backup) && $action_name == 'backup_restore_mail') { |
| | | if (is_array($mail_backup)) { |
| | | $app->uses('ini_parser,file,getconf'); |
| | | |
| | | $server_config = $app->getconf->get_server_config($conf['server_id'], 'server'); |
| | | $backup_dir = trim($server_config['backup_dir']); |
| | | |
| | | if($backup_dir == '') return; |
| | | |
| | | $backup_dir = $server_config['backup_dir']; |
| | | $backup_dir_is_ready = true; |
| | | |
| | | //* mount backup directory, if necessary |
| | |
| | | chgrp($record['maildir'], $mail_config['mailuser_group']); |
| | | } |
| | | |
| | | if ($action_name == 'backup_restore_mail') { |
| | | if(file_exists($mail_backup_file) && $record['homedir'] != '' && $record['homedir'] != '/' && !stristr($mail_backup_file,'..') && !stristr($mail_backup_file,'etc') && $mail_config['homedir_path'] == $record['homedir'] && is_dir($domain_dir) && is_dir($record['maildir'])) { |
| | | if ($record['maildir_format'] == 'mdbox') { |
| | | $retval = -1; |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | if($action_name == 'backup_delete_mail') { |
| | | if(file_exists($mail_backup_file) && !stristr($mail_backup_file, '..') && !stristr($mail_backup_file, 'etc')) { |
| | | unlink($mail_backup_file); |
| | | $sql = "DELETE FROM mail_backup WHERE server_id = ? AND parent_domain_id = ? AND filename = ?"; |
| | | $app->db->query($sql, $conf['server_id'], $mail_backup['parent_domain_id'], $mail_backup['filename']); |
| | | if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql); |
| | | $app->log('unlink '.$backup_dir.'/'.$mail_backup['filename'], LOGLEVEL_DEBUG); |
| | | } |
| | | } |
| | | |
| | | if( $server_config['backup_dir_is_mount'] == 'y' ) $app->system->umount_backup_dir($backup_dir); |
| | | } else { |
| | | $app->log('Backup directory not ready.', LOGLEVEL_DEBUG); |