From 8bc6a8c3afa1e19bbf796558b0e8df5e5471aad6 Mon Sep 17 00:00:00 2001
From: Ramil Valitov <ramilvalitov@gmail.com>
Date: Thu, 28 May 2020 16:45:27 +0200
Subject: [PATCH] New code for backups with lots of new features

---
 .../sql/incremental/upd_dev_collection.sql    |   12 +
 install/sql/ispconfig3.sql                    |    6 +
 .../lib/classes/aps_guicontroller.inc.php     |    2 +
 .../lib/classes/plugin_backuplist.inc.php     |   57 +-
 interface/lib/classes/remote.d/sites.inc.php  |    8 +-
 .../lib/classes/sites_database_plugin.inc.php |    6 +-
 interface/lib/classes/system.inc.php          |   12 +
 .../sites_web_vhost_domain_plugin.inc.php     |    8 +-
 .../web/sites/form/web_vhost_domain.tform.php |   76 +-
 .../web/sites/lib/lang/ar_web_backup_list.lng |   32 +
 .../sites/lib/lang/ar_web_vhost_domain.lng    |   27 +
 .../web/sites/lib/lang/bg_web_backup_list.lng |   32 +
 .../sites/lib/lang/bg_web_vhost_domain.lng    |   27 +
 .../web/sites/lib/lang/br_web_backup_list.lng |   33 +-
 .../sites/lib/lang/br_web_vhost_domain.lng    |   27 +
 .../web/sites/lib/lang/ca_web_backup_list.lng |   32 +
 .../sites/lib/lang/ca_web_vhost_domain.lng    |   27 +
 .../web/sites/lib/lang/cz_web_backup_list.lng |   32 +
 .../sites/lib/lang/cz_web_vhost_domain.lng    |   27 +
 .../web/sites/lib/lang/de_web_backup_list.lng |   32 +
 .../sites/lib/lang/de_web_vhost_domain.lng    |   27 +
 .../web/sites/lib/lang/dk_web_backup_list.lng |   32 +
 .../sites/lib/lang/dk_web_vhost_domain.lng    |   27 +
 .../web/sites/lib/lang/el_web_backup_list.lng |   32 +
 .../sites/lib/lang/el_web_vhost_domain.lng    |   27 +
 .../web/sites/lib/lang/en_web_backup_list.lng |   35 +-
 .../sites/lib/lang/en_web_vhost_domain.lng    |   27 +
 .../web/sites/lib/lang/es_web_backup_list.lng |   32 +
 .../sites/lib/lang/es_web_vhost_domain.lng    |   27 +
 .../web/sites/lib/lang/fi_web_backup_list.lng |   32 +
 .../sites/lib/lang/fi_web_vhost_domain.lng    |   27 +
 .../web/sites/lib/lang/fr_web_backup_list.lng |   32 +
 .../sites/lib/lang/fr_web_vhost_domain.lng    |   27 +
 .../web/sites/lib/lang/hr_web_backup_list.lng |   32 +
 .../sites/lib/lang/hr_web_vhost_domain.lng    |   27 +
 .../web/sites/lib/lang/hu_web_backup_list.lng |   32 +
 .../sites/lib/lang/hu_web_vhost_domain.lng    |   27 +
 .../web/sites/lib/lang/id_web_backup_list.lng |   32 +
 .../sites/lib/lang/id_web_vhost_domain.lng    |   27 +
 .../web/sites/lib/lang/it_web_backup_list.lng |   32 +
 .../sites/lib/lang/it_web_vhost_domain.lng    |   27 +
 .../web/sites/lib/lang/ja_web_backup_list.lng |   32 +
 .../sites/lib/lang/ja_web_vhost_domain.lng    |   27 +
 .../web/sites/lib/lang/nl_web_backup_list.lng |   32 +
 .../sites/lib/lang/nl_web_vhost_domain.lng    |   27 +
 .../web/sites/lib/lang/pl_web_backup_list.lng |   32 +
 .../sites/lib/lang/pl_web_vhost_domain.lng    |   27 +
 .../web/sites/lib/lang/pt_web_backup_list.lng |   32 +
 .../sites/lib/lang/pt_web_vhost_domain.lng    |   27 +
 .../web/sites/lib/lang/ro_web_backup_list.lng |   32 +
 .../sites/lib/lang/ro_web_vhost_domain.lng    |   27 +
 .../web/sites/lib/lang/ru_web_backup_list.lng |   32 +
 .../sites/lib/lang/ru_web_vhost_domain.lng    |   27 +
 .../web/sites/lib/lang/se_web_backup_list.lng |   32 +
 .../sites/lib/lang/se_web_vhost_domain.lng    |   27 +
 .../web/sites/lib/lang/sk_web_backup_list.lng |   32 +
 .../sites/lib/lang/sk_web_vhost_domain.lng    |   27 +
 .../web/sites/lib/lang/tr_web_backup_list.lng |   33 +-
 .../sites/lib/lang/tr_web_vhost_domain.lng    |   27 +
 .../web/sites/templates/web_backup_list.htm   |   18 +-
 .../templates/web_vhost_domain_backup.htm     |   48 +-
 .../API-docs/sites_database_add.html          |    2 +
 .../API-docs/sites_web_aliasdomain_add.html   |    2 +
 .../sites_web_aliasdomain_update.html         |    2 +
 .../API-docs/sites_web_subdomain_add.html     |    2 +
 .../API-docs/sites_web_subdomain_update.html  |    2 +
 .../examples/sites_database_add.php           |    2 +
 .../examples/sites_web_aliasdomain_add.php    |    2 +
 .../examples/sites_web_domain_add.php         |    2 +
 .../examples/sites_web_subdomain_add.php      |    2 +
 server/backup-now.php                         |  108 ++
 server/lib/app.inc.php                        |    4 +
 server/lib/classes/backup.inc.php             | 1452 +++++++++++++++++
 server/lib/classes/cron.d/500-backup.inc.php  |  364 +----
 .../plugins-available/backup_plugin.inc.php   |   78 +-
 75 files changed, 3340 insertions(+), 417 deletions(-)
 create mode 100644 server/backup-now.php
 create mode 100644 server/lib/classes/backup.inc.php

diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql
index 29ba602bf8..d07b33d4ba 100644
--- a/install/sql/incremental/upd_dev_collection.sql
+++ b/install/sql/incremental/upd_dev_collection.sql
@@ -1,3 +1,15 @@
 -- add new proxy_protocol column
 ALTER TABLE `web_domain`
     ADD COLUMN `proxy_protocol` ENUM('n','y') NOT NULL DEFAULT 'n' AFTER `log_retention`;
+
+-- backup format
+ALTER TABLE `web_domain` ADD  `backup_format_web` VARCHAR( 255 ) NOT NULL default 'default' AFTER `backup_copies`;
+ALTER TABLE `web_domain` ADD  `backup_format_db` VARCHAR( 255 ) NOT NULL default 'gzip' AFTER `backup_format_web`;
+-- end of backup format
+
+-- backup encryption
+ALTER TABLE `web_domain` ADD  `backup_encrypt` enum('n','y') NOT NULL DEFAULT 'n' AFTER `backup_format_db`;
+ALTER TABLE `web_domain` ADD  `backup_password` VARCHAR( 255 ) NOT NULL DEFAULT '' AFTER `backup_encrypt`;
+ALTER TABLE `web_backup` ADD  `backup_format` VARCHAR( 64 ) NOT NULL DEFAULT '' AFTER `backup_mode`;
+ALTER TABLE `web_backup` ADD  `backup_password` VARCHAR( 255 ) NOT NULL DEFAULT '' AFTER `filesize`;
+-- end of backup encryption
diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql
index bfef9733e5..b64eab94c3 100644
--- a/install/sql/ispconfig3.sql
+++ b/install/sql/ispconfig3.sql
@@ -1922,9 +1922,11 @@ CREATE TABLE `web_backup` (
   `parent_domain_id` int(10) unsigned NOT NULL DEFAULT '0',
   `backup_type` enum('web','mysql','mongodb') NOT NULL DEFAULT 'web',
   `backup_mode` varchar(64) NOT NULL DEFAULT  '',
+  `backup_format` varchar(64) NOT NULL DEFAULT '',
   `tstamp` int(10) unsigned NOT NULL DEFAULT '0',
   `filename` varchar(255) NOT NULL DEFAULT '',
   `filesize` VARCHAR(20) NOT NULL DEFAULT '',
+  `backup_password` VARCHAR(255) NOT NULL DEFAULT '',
   PRIMARY KEY (`backup_id`)
 ) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
 
@@ -2055,6 +2057,10 @@ CREATE TABLE `web_domain` (
   `custom_php_ini` mediumtext,
   `backup_interval` VARCHAR( 255 ) NOT NULL DEFAULT 'none',
   `backup_copies` INT NOT NULL DEFAULT '1',
+  `backup_format_web` VARCHAR( 255 ) NOT NULL default 'default',
+  `backup_format_db` VARCHAR( 255 ) NOT NULL default 'gzip',
+  `backup_encrypt` enum('n','y') NOT NULL DEFAULT 'n',
+  `backup_password` VARCHAR( 255 ) NOT NULL DEFAULT '',
   `backup_excludes` mediumtext,
   `active` enum('n','y') NOT NULL default 'y',
   `traffic_quota_lock` enum('n','y') NOT NULL default 'n',
diff --git a/interface/lib/classes/aps_guicontroller.inc.php b/interface/lib/classes/aps_guicontroller.inc.php
index 8e4c17af79..b1ebf9d189 100644
--- a/interface/lib/classes/aps_guicontroller.inc.php
+++ b/interface/lib/classes/aps_guicontroller.inc.php
@@ -340,6 +340,8 @@ class ApsGUIController extends ApsBase
 								 "remote_access" => $mysql_db_remote_access,
 								 "remote_ips" => $mysql_db_remote_ips,
 								 "backup_copies" => $websrv['backup_copies'],
+								 "backup_format_web" => $websrv['backup_format_web'],
+								 "backup_format_db" => $websrv['backup_format_db'],
 								 "active" => 'y', 
 								 "backup_interval" => $websrv['backup_interval']
 								 );
diff --git a/interface/lib/classes/plugin_backuplist.inc.php b/interface/lib/classes/plugin_backuplist.inc.php
index e96be012e3..9e21dc6ba6 100644
--- a/interface/lib/classes/plugin_backuplist.inc.php
+++ b/interface/lib/classes/plugin_backuplist.inc.php
@@ -37,6 +37,34 @@ class plugin_backuplist extends plugin_base {
 	var $formdef;
 	var $options;
 
+	/**
+	 * Process request to make a backup. This request is triggered manually by the user in the ISPConfig interface.
+	 * @param string $message
+	 * @param string $error
+	 * @param string[] $wb language text
+	 * @author Ramil Valitov <ramilvalitov@gmail.com>
+	 * @uses backup_plugin::make_backup_callback() this method is called later in the plugin to run the backup
+	 */
+	protected function makeBackup(&$message, &$error, $wb)
+	{
+		global $app;
+
+		$mode = $_GET['make_backup'];
+		$action_type = ($mode == 'web') ? 'backup_web_files' : 'backup_database';
+		$domain_id = intval($this->form->id);
+
+		$sql = "SELECT count(action_id) as number FROM sys_remoteaction WHERE action_state = 'pending' AND action_type = ? AND action_param = ?";
+		$tmp = $app->db->queryOneRecord($sql, $action_type, $domain_id);
+		if ($tmp['number'] == 0) {
+			$server_id = $this->form->dataRecord['server_id'];
+			$message .= $wb['backup_info_txt'];
+			$sql = "INSERT INTO sys_remoteaction (server_id, tstamp, action_type, action_param, action_state, response) VALUES (?, UNIX_TIMESTAMP(), ?, ?, 'pending', '')";
+			$app->db->query($sql, $server_id, $action_type, $domain_id);
+		} else {
+			$error .= $wb['backup_pending_txt'];
+		}
+	}
+
 	function onShow() {
 
 		global $app;
@@ -52,6 +80,10 @@ class plugin_backuplist extends plugin_base {
 		$message = '';
 		$error = '';
 
+		if (isset($_GET['make_backup'])) {
+			$this->makeBackup($message, $error, $wb);
+		}
+
 		if(isset($_GET['backup_action'])) {
 			$backup_id = $app->functions->intval($_GET['backup_id']);
 
@@ -137,7 +169,30 @@ class plugin_backuplist extends plugin_base {
 				$rec["bgcolor"] = $bgcolor;
 
 				$rec['date'] = date($app->lng('conf_format_datetime'), $rec['tstamp']);
-				$rec['backup_type'] = $wb[('backup_type_'.$rec['backup_type'])];
+				$backup_format = $rec['backup_format'];
+				if (empty($backup_format)) {
+					//We have a backup from old version of ISPConfig
+					switch ($rec['backup_type']) {
+						case 'mysql':
+							$backup_format = 'gzip';
+							break;
+						case 'web':
+							$backup_format = ($rec['backup_mode'] == 'userzip') ? 'zip' : 'tar_gzip';
+							break;
+						default:
+							$app->log('Unsupported backup type "' . $rec['backup_type'] . '" for backup id ' . $rec['backup_id'], LOGLEVEL_ERROR);
+							break;
+					}
+				}
+				$rec['backup_type'] = $wb[('backup_type_' . $rec['backup_type'])];
+				$backup_format = (!empty($backup_format)) ? $wb[('backup_format_' . $backup_format . '_txt')] : $wb["backup_format_unknown_txt"];
+				if (empty($backup_format))
+					$backup_format = $wb["backup_format_unknown_txt"];
+
+				$rec['backup_format'] = $backup_format;
+				$rec['backup_encrypted'] = empty($rec['backup_password']) ? $wb["no_txt"] : $wb["yes_txt"];
+				$backup_manual_prefix = 'manual-';
+				$rec['backup_job'] = (substr($rec['filename'], 0, strlen($backup_manual_prefix)) == $backup_manual_prefix) ? $wb["backup_job_manual_txt"] : $wb["backup_job_auto_txt"];
 				
 				$rec['download_available'] = true;
 				if($rec['server_id'] != $web['server_id']) $rec['download_available'] = false;
diff --git a/interface/lib/classes/remote.d/sites.inc.php b/interface/lib/classes/remote.d/sites.inc.php
index d90b90bd89..9efbecc091 100644
--- a/interface/lib/classes/remote.d/sites.inc.php
+++ b/interface/lib/classes/remote.d/sites.inc.php
@@ -132,10 +132,12 @@ class remoting_sites extends remoting {
 			$app->sites_database_plugin->processDatabaseInsert($this);
 			
 			// set correct values for backup_interval and backup_copies
-			if(isset($params['backup_interval']) || isset($params['backup_copies'])){
+			if(isset($params['backup_interval']) || isset($params['backup_copies']) || isset($params['backup_format_web']) || isset($params['backup_format_db'])){
 				$sql_set = array();
 				if(isset($params['backup_interval'])) $sql_set[] = "backup_interval = '".$app->db->quote($params['backup_interval'])."'";
 				if(isset($params['backup_copies'])) $sql_set[] = "backup_copies = ".$app->functions->intval($params['backup_copies']);
+				if(isset($params['backup_format_web'])) $sql_set[] = "backup_format_web = ".$app->functions->intval($params['backup_format_web']);
+				if(isset($params['backup_format_db'])) $sql_set[] = "backup_format_db = ".$app->functions->intval($params['backup_format_db']);
 				$this->updateQueryExecute("UPDATE web_database SET ".implode(', ', $sql_set)." WHERE database_id = ".$retval, $retval, $params);
 			}
 			
@@ -165,10 +167,12 @@ class remoting_sites extends remoting {
 			$retval = $this->updateQueryExecute($sql, $primary_id, $params);
 			
 			// set correct values for backup_interval and backup_copies
-			if(isset($params['backup_interval']) || isset($params['backup_copies'])){
+			if(isset($params['backup_interval']) || isset($params['backup_copies']) || isset($params['backup_format_web']) || isset($params['backup_format_db'])){
 				$sql_set = array();
 				if(isset($params['backup_interval'])) $sql_set[] = "backup_interval = '".$app->db->quote($params['backup_interval'])."'";
 				if(isset($params['backup_copies'])) $sql_set[] = "backup_copies = ".$app->functions->intval($params['backup_copies']);
+				if(isset($params['backup_format_web'])) $sql_set[] = "backup_format_web = ".$app->functions->intval($params['backup_format_web']);
+				if(isset($params['backup_format_db'])) $sql_set[] = "backup_format_db = ".$app->functions->intval($params['backup_format_db']);
 				$this->updateQueryExecute("UPDATE web_database SET ".implode(', ', $sql_set)." WHERE database_id = ".$primary_id, $primary_id, $params);
 			}
 			
diff --git a/interface/lib/classes/sites_database_plugin.inc.php b/interface/lib/classes/sites_database_plugin.inc.php
index 89cb7ce9c2..faf3fa30f7 100644
--- a/interface/lib/classes/sites_database_plugin.inc.php
+++ b/interface/lib/classes/sites_database_plugin.inc.php
@@ -45,10 +45,12 @@ class sites_database_plugin {
 			//* The Database user shall be owned by the same group then the website
 			$sys_groupid = $app->functions->intval($web['sys_groupid']);
 			$backup_interval = $web['backup_interval'];
+			$backup_format_web = $web['backup_format_web'];
+			$backup_format_db = $web['backup_format_db'];
 			$backup_copies = $app->functions->intval($web['backup_copies']);
 
-			$sql = "UPDATE web_database SET sys_groupid = ?, backup_interval = ?, backup_copies = ? WHERE database_id = ?";
-			$app->db->query($sql, $sys_groupid, $backup_interval, $backup_copies, $form_page->id);
+			$sql = "UPDATE web_database SET sys_groupid = ?, backup_interval = ?, backup_copies = ?, backup_format_web = ?, backup_format_db = ? WHERE database_id = ?";
+			$app->db->query($sql, $sys_groupid, $backup_interval, $backup_copies, $backup_format_web, $backup_format_db, $form_page->id);
 		}
 	}
 
diff --git a/interface/lib/classes/system.inc.php b/interface/lib/classes/system.inc.php
index 0be2b6b1e9..b6d3479694 100644
--- a/interface/lib/classes/system.inc.php
+++ b/interface/lib/classes/system.inc.php
@@ -97,5 +97,17 @@ class system {
 		call_user_func_array(array($this, 'exec_safe'), func_get_args());
 		return implode("\n", $this->_last_exec_out);
 	}	
+
+    //* Check if a application is installed
+    public function is_installed($appname) {
+        $this->exec_safe('which ? 2> /dev/null', $appname);
+        $out = $this->last_exec_out();
+        $returncode = $this->last_exec_retcode();
+        if(isset($out[0]) && stristr($out[0], $appname) && $returncode == 0) {
+            return true;
+        } else {
+            return false;
+        }
+    }
 	
 } //* End Class
diff --git a/interface/lib/plugins/sites_web_vhost_domain_plugin.inc.php b/interface/lib/plugins/sites_web_vhost_domain_plugin.inc.php
index 2d1ce3794a..3f9b0db5b6 100644
--- a/interface/lib/plugins/sites_web_vhost_domain_plugin.inc.php
+++ b/interface/lib/plugins/sites_web_vhost_domain_plugin.inc.php
@@ -249,18 +249,22 @@ class sites_web_vhost_domain_plugin {
 				}
 
 				//* Change database backup options when web backup options have been changed
-				if(isset($page_form->dataRecord['backup_interval']) && ($page_form->dataRecord['backup_interval'] != $page_form->oldDataRecord['backup_interval'] || $page_form->dataRecord['backup_copies'] != $page_form->oldDataRecord['backup_copies'])) {
+				if(isset($page_form->dataRecord['backup_interval']) && ($page_form->dataRecord['backup_interval'] != $page_form->oldDataRecord['backup_interval'] || $page_form->dataRecord['backup_copies'] != $page_form->oldDataRecord['backup_copies'] || $page_form->dataRecord['backup_format_web'] != $page_form->oldDataRecord['backup_format_web'] || $page_form->dataRecord['backup_format_db'] != $page_form->oldDataRecord['backup_format_db'])) {
 					//* Update all databases
 					$backup_interval = $page_form->dataRecord['backup_interval'];
 					$backup_copies = $app->functions->intval($page_form->dataRecord['backup_copies']);
+					$backup_format_web = $page_form->dataRecord['backup_format_web'];
+					$backup_format_db = $page_form->dataRecord['backup_format_db'];
 					$records = $app->db->queryAllRecords("SELECT database_id FROM web_database WHERE parent_domain_id = ".$page_form->id);
 					foreach($records as $rec) {
-						$app->db->datalogUpdate('web_database', array("backup_interval" => $backup_interval, "backup_copies" => $backup_copies), 'database_id', $rec['database_id']);
+						$app->db->datalogUpdate('web_database', array("backup_interval" => $backup_interval, "backup_copies" => $backup_copies, "backup_format_web" => $backup_format_web, "backup_format_db" => $backup_format_db), 'database_id', $rec['database_id']);
 					}
 					unset($records);
 					unset($rec);
 					unset($backup_copies);
 					unset($backup_interval);
+                    unset($backup_format_web);
+                    unset($backup_format_db);
 				}
 
 				//* Change vhost subdomain and alias ip/ipv6 if domain ip/ipv6 has changed
diff --git a/interface/web/sites/form/web_vhost_domain.tform.php b/interface/web/sites/form/web_vhost_domain.tform.php
index 5c3057f685..24ee6d4e62 100644
--- a/interface/web/sites/form/web_vhost_domain.tform.php
+++ b/interface/web/sites/form/web_vhost_domain.tform.php
@@ -96,7 +96,7 @@ if(!$app->auth->is_admin()) {
 	if($client['limit_backup'] != 'y') $backup_available = false;
 }
 
-$app->uses('getconf');
+$app->uses('getconf,system');
 $web_config = $app->getconf->get_global_config('sites');
 
 $form["tabs"]['domain'] = array (
@@ -649,6 +649,28 @@ $form["tabs"]['stats'] = array (
 
 //* Backup
 if ($backup_available) {
+	$missing_utils = array();
+	$compressors_list = array(
+		'gzip',
+		'gunzip',
+		'zip',
+		'unzip',
+		'pigz',
+		'tar',
+		'bzip2',
+		'bunzip2',
+		'xz',
+		'unxz',
+		'7z',
+		'rar',
+	);
+	foreach ($compressors_list as $compressor) {
+		if (!$app->system->is_installed($compressor)) {
+			array_push($missing_utils, $compressor);
+		}
+	}
+	$app->tpl->setVar("missing_utils", implode(", ",$missing_utils), true);
+
 	$form["tabs"]['backup'] = array (
 		'title'  => "Backup",
 		'width'  => 100,
@@ -682,6 +704,58 @@ if ($backup_available) {
 				'width'  => '30',
 				'maxlength' => '255'
 			),
+			'backup_format_web' => array (
+				'datatype' => 'VARCHAR',
+				'formtype' => 'SELECT',
+				'default' => '',
+				'value' => array(
+					'default' => 'backup_format_default_txt',
+					'zip' => 'backup_format_zip_txt',
+					'zip_bzip2' => 'backup_format_zip_bzip2_txt',
+					'tar_gzip' => 'backup_format_tar_gzip_txt',
+					'tar_bzip2' => 'backup_format_tar_bzip2_txt',
+					'tar_xz' => 'backup_format_tar_xz_txt',
+					'tar_7z_lzma2' => 'backup_format_tar_7z_lzma2_txt',
+					'tar_7z_lzma' => 'backup_format_tar_7z_lzma_txt',
+					'tar_7z_ppmd' => 'backup_format_tar_7z_ppmd_txt',
+					'tar_7z_bzip2' => 'backup_format_tar_7z_bzip2_txt',
+					'rar' => 'backup_format_rar_txt',
+				)
+			),
+			'backup_format_db' => array (
+				'datatype' => 'VARCHAR',
+				'formtype' => 'SELECT',
+				'default' => '',
+				'value' => array(
+					'zip' => 'backup_format_zip_txt',
+					'zip_bzip2' => 'backup_format_zip_bzip2_txt',
+					'gzip' => 'backup_format_gzip_txt',
+					'bzip2' => 'backup_format_bzip2_txt',
+					'xz' => 'backup_format_xz_txt',
+					'7z_lzma2' => 'backup_format_7z_lzma2_txt',
+					'7z_lzma' => 'backup_format_7z_lzma_txt',
+					'7z_ppmd' => 'backup_format_7z_ppmd_txt',
+					'7z_bzip2' => 'backup_format_7z_bzip2_txt',
+					'rar' => 'backup_format_rar_txt',
+				)
+			),
+			'backup_encrypt' => array (
+				'datatype' => 'VARCHAR',
+				'formtype' => 'CHECKBOX',
+				'default'  => 'n',
+				'value' => array (
+					0 => 'n',
+					1 => 'y'
+				)
+			),
+			'backup_password' => array (
+				'datatype' => 'VARCHAR',
+				'formtype' => 'TEXT',
+				'default' => '',
+				'value'  => '',
+				'width'  => '30',
+				'maxlength' => '255'
+			),
 			//#################################
 			// END Datatable fields
 			//#################################
diff --git a/interface/web/sites/lib/lang/ar_web_backup_list.lng b/interface/web/sites/lib/lang/ar_web_backup_list.lng
index d1133334f0..056c7576ae 100644
--- a/interface/web/sites/lib/lang/ar_web_backup_list.lng
+++ b/interface/web/sites/lib/lang/ar_web_backup_list.lng
@@ -18,4 +18,36 @@ $wb['backup_type_mysql'] = 'MySQL Database';
 $wb['backup_type_web'] = 'Website files';
 $wb['filesize_txt'] = 'Filesize';
 $wb['backup_type_mongodb'] = 'MongoDB Database';
+$wb['backup_pending_txt'] = 'There is already a pending backup job.';
+$wb['error_txt'] = 'Error';
+$wb['backup_info_txt'] = 'A backup process started. This action can take several minutes to complete.';
+$wb["backup_format_txt"] = 'Backup format';
+$wb["backup_format_unknown_txt"] = 'Unknown';
+$wb["backup_job_txt"] = 'Scheduler';
+$wb["backup_job_manual_txt"] = 'Manual';
+$wb["backup_job_auto_txt"] = 'Auto';
+$wb["manual_backup_title_txt"] = 'Manual backup';
+$wb["make_backup_web_txt"] = 'Make backup of web files';
+$wb["make_backup_database_txt"] = 'Make backup of databases';
+$wb["make_backup_confirm_txt"] = 'You are about to start a manual backup process. Manual backups count towards the total number of allowed backup copies: therefore if the limit will be exceeded, then oldest backups may be deleted automatically. Proceed?';
+$wb["yes_txt"] = 'Yes';
+$wb["no_txt"] = 'No';
+$wb["backup_is_encrypted_txt"] = "Encrypted";
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
+$wb["backup_format_rar_txt"] = 'RAR';
 ?>
diff --git a/interface/web/sites/lib/lang/ar_web_vhost_domain.lng b/interface/web/sites/lib/lang/ar_web_vhost_domain.lng
index f866aa7b25..f9c396616b 100644
--- a/interface/web/sites/lib/lang/ar_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/ar_web_vhost_domain.lng
@@ -156,4 +156,31 @@ $wb['log_retention_txt'] = 'Logfiles retention time';
 $wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
 $wb['limit_web_quota_not_0_txt'] = 'Harddisk Quota cannot be set to 0.';
 $wb['proxy_protocol_txt'] = 'Enable PROXY Protocol';
+$wb["backup_format_web_txt"] = 'Backup format for web files';
+$wb["backup_format_db_txt"] = 'Backup format for database';
+$wb["backup_format_web_note_txt"] = 'In "default" mode ISPConfig has the following behaviour: if backup mode is set as web user, then "zip" format is used for web files, otherwise backup mode is set as root user and "tar (gzip)" format is used; database is compressed in "gzip" format. Only "tar" based formats and "rar" preserve file ownership and permissions of web files and guarantee correct restore.';
+$wb["backup_missing_utils_txt"] = 'Note: some utils are missing in the system that may prevent you from using some compression formats. Please, install the following utils to avoid possible backup problems: ';
+$wb["backup_compression_options_txt"] = 'Compression options';
+$wb["backup_encryption_note_txt"] = "Encryption is available only for the following backup formats: \"7z\", \"RAR\", \"zip\" (not secure). If any other format is used then encryption can't be applied and encryption settings are ignored. You can safely change the password at anytime: the \"Restore\" button will still work for old backups encrypted with a previous password. You don't need to type a password to restore backups using the \"Restore\" button. Password is required when you extract the archives manually. Please, don't forget your password, because it's impossible to restore it.";
+$wb["backup_encryption_options_txt"] = 'Encryption options';
+$wb["backup_enable_encryption_txt"] = 'Enable encryption';
+$wb["backup_password_txt"] = 'Password';
+$wb["backup_format_default_txt"] = 'Default: zip (deflate) or tar (gzip)';
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_rar_txt"] = 'RAR';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
 ?>
diff --git a/interface/web/sites/lib/lang/bg_web_backup_list.lng b/interface/web/sites/lib/lang/bg_web_backup_list.lng
index d1133334f0..056c7576ae 100644
--- a/interface/web/sites/lib/lang/bg_web_backup_list.lng
+++ b/interface/web/sites/lib/lang/bg_web_backup_list.lng
@@ -18,4 +18,36 @@ $wb['backup_type_mysql'] = 'MySQL Database';
 $wb['backup_type_web'] = 'Website files';
 $wb['filesize_txt'] = 'Filesize';
 $wb['backup_type_mongodb'] = 'MongoDB Database';
+$wb['backup_pending_txt'] = 'There is already a pending backup job.';
+$wb['error_txt'] = 'Error';
+$wb['backup_info_txt'] = 'A backup process started. This action can take several minutes to complete.';
+$wb["backup_format_txt"] = 'Backup format';
+$wb["backup_format_unknown_txt"] = 'Unknown';
+$wb["backup_job_txt"] = 'Scheduler';
+$wb["backup_job_manual_txt"] = 'Manual';
+$wb["backup_job_auto_txt"] = 'Auto';
+$wb["manual_backup_title_txt"] = 'Manual backup';
+$wb["make_backup_web_txt"] = 'Make backup of web files';
+$wb["make_backup_database_txt"] = 'Make backup of databases';
+$wb["make_backup_confirm_txt"] = 'You are about to start a manual backup process. Manual backups count towards the total number of allowed backup copies: therefore if the limit will be exceeded, then oldest backups may be deleted automatically. Proceed?';
+$wb["yes_txt"] = 'Yes';
+$wb["no_txt"] = 'No';
+$wb["backup_is_encrypted_txt"] = "Encrypted";
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
+$wb["backup_format_rar_txt"] = 'RAR';
 ?>
diff --git a/interface/web/sites/lib/lang/bg_web_vhost_domain.lng b/interface/web/sites/lib/lang/bg_web_vhost_domain.lng
index 84b729eda5..1ab6c244cc 100644
--- a/interface/web/sites/lib/lang/bg_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/bg_web_vhost_domain.lng
@@ -156,4 +156,31 @@ $wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min.
 $wb['domain_error_acme_invalid'] = 'Domain name acme.invalid not permitted.';
 $wb['limit_web_quota_not_0_txt'] = 'Harddisk Quota cannot be set to 0.';
 $wb['proxy_protocol_txt'] = 'Enable PROXY Protocol';
+$wb["backup_format_web_txt"] = 'Backup format for web files';
+$wb["backup_format_db_txt"] = 'Backup format for database';
+$wb["backup_format_web_note_txt"] = 'In "default" mode ISPConfig has the following behaviour: if backup mode is set as web user, then "zip" format is used for web files, otherwise backup mode is set as root user and "tar (gzip)" format is used; database is compressed in "gzip" format. Only "tar" based formats and "rar" preserve file ownership and permissions of web files and guarantee correct restore.';
+$wb["backup_missing_utils_txt"] = 'Note: some utils are missing in the system that may prevent you from using some compression formats. Please, install the following utils to avoid possible backup problems: ';
+$wb["backup_compression_options_txt"] = 'Compression options';
+$wb["backup_encryption_note_txt"] = "Encryption is available only for the following backup formats: \"7z\", \"RAR\", \"zip\" (not secure). If any other format is used then encryption can't be applied and encryption settings are ignored. You can safely change the password at anytime: the \"Restore\" button will still work for old backups encrypted with a previous password. You don't need to type a password to restore backups using the \"Restore\" button. Password is required when you extract the archives manually. Please, don't forget your password, because it's impossible to restore it.";
+$wb["backup_encryption_options_txt"] = 'Encryption options';
+$wb["backup_enable_encryption_txt"] = 'Enable encryption';
+$wb["backup_password_txt"] = 'Password';
+$wb["backup_format_default_txt"] = 'Default: zip (deflate) or tar (gzip)';
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_rar_txt"] = 'RAR';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
 ?>
diff --git a/interface/web/sites/lib/lang/br_web_backup_list.lng b/interface/web/sites/lib/lang/br_web_backup_list.lng
index 82883c1f29..00384c6e15 100644
--- a/interface/web/sites/lib/lang/br_web_backup_list.lng
+++ b/interface/web/sites/lib/lang/br_web_backup_list.lng
@@ -18,5 +18,36 @@ $wb['delete_pending_txt'] = 'Já existe uma remoção de backup em andamento.';
 $wb['backup_type_mongodb'] = 'MongoDB';
 $wb['backup_type_mysql'] = 'MySQL';
 $wb['backup_type_web'] = 'Arquivos do site';
-
+$wb['backup_pending_txt'] = 'There is already a pending backup job.';
+$wb['error_txt'] = 'Error';
+$wb['backup_info_txt'] = 'A backup process started. This action can take several minutes to complete.';
+$wb["backup_format_txt"] = 'Backup format';
+$wb["backup_format_unknown_txt"] = 'Unknown';
+$wb["backup_job_txt"] = 'Scheduler';
+$wb["backup_job_manual_txt"] = 'Manual';
+$wb["backup_job_auto_txt"] = 'Auto';
+$wb["manual_backup_title_txt"] = 'Manual backup';
+$wb["make_backup_web_txt"] = 'Make backup of web files';
+$wb["make_backup_database_txt"] = 'Make backup of databases';
+$wb["make_backup_confirm_txt"] = 'You are about to start a manual backup process. Manual backups count towards the total number of allowed backup copies: therefore if the limit will be exceeded, then oldest backups may be deleted automatically. Proceed?';
+$wb["yes_txt"] = 'Yes';
+$wb["no_txt"] = 'No';
+$wb["backup_is_encrypted_txt"] = "Encrypted";
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
+$wb["backup_format_rar_txt"] = 'RAR';
 ?>
diff --git a/interface/web/sites/lib/lang/br_web_vhost_domain.lng b/interface/web/sites/lib/lang/br_web_vhost_domain.lng
index 7d021d4a32..a074b160a3 100644
--- a/interface/web/sites/lib/lang/br_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/br_web_vhost_domain.lng
@@ -161,4 +161,31 @@ $wb['log_retention_txt'] = 'Tempo de retenção do log de arquivos';
 $wb['log_retention_error_regex'] = 'Tempo de retenção em dias (valores permitidos: mínimo 0, máximo 9999)';
 $wb['limit_web_quota_not_0_txt'] = 'Cota de disco não pode ser configurada para 0.';
 $wb['proxy_protocol_txt'] = 'Enable PROXY Protocol';
+$wb["backup_format_web_txt"] = 'Backup format for web files';
+$wb["backup_format_db_txt"] = 'Backup format for database';
+$wb["backup_format_web_note_txt"] = 'In "default" mode ISPConfig has the following behaviour: if backup mode is set as web user, then "zip" format is used for web files, otherwise backup mode is set as root user and "tar (gzip)" format is used; database is compressed in "gzip" format. Only "tar" based formats and "rar" preserve file ownership and permissions of web files and guarantee correct restore.';
+$wb["backup_missing_utils_txt"] = 'Note: some utils are missing in the system that may prevent you from using some compression formats. Please, install the following utils to avoid possible backup problems: ';
+$wb["backup_compression_options_txt"] = 'Compression options';
+$wb["backup_encryption_note_txt"] = "Encryption is available only for the following backup formats: \"7z\", \"RAR\", \"zip\" (not secure). If any other format is used then encryption can't be applied and encryption settings are ignored. You can safely change the password at anytime: the \"Restore\" button will still work for old backups encrypted with a previous password. You don't need to type a password to restore backups using the \"Restore\" button. Password is required when you extract the archives manually. Please, don't forget your password, because it's impossible to restore it.";
+$wb["backup_encryption_options_txt"] = 'Encryption options';
+$wb["backup_enable_encryption_txt"] = 'Enable encryption';
+$wb["backup_password_txt"] = 'Password';
+$wb["backup_format_default_txt"] = 'Default: zip (deflate) or tar (gzip)';
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_rar_txt"] = 'RAR';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
 ?>
diff --git a/interface/web/sites/lib/lang/ca_web_backup_list.lng b/interface/web/sites/lib/lang/ca_web_backup_list.lng
index 97b04a0c05..89d40ddb05 100644
--- a/interface/web/sites/lib/lang/ca_web_backup_list.lng
+++ b/interface/web/sites/lib/lang/ca_web_backup_list.lng
@@ -18,4 +18,36 @@ $wb['delete_info_txt'] = 'Delete of the backup has been started. This action tak
 $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_pending_txt'] = 'There is already a pending backup job.';
+$wb['error_txt'] = 'Error';
+$wb['backup_info_txt'] = 'A backup process started. This action can take several minutes to complete.';
+$wb["backup_format_txt"] = 'Backup format';
+$wb["backup_format_unknown_txt"] = 'Unknown';
+$wb["backup_job_txt"] = 'Scheduler';
+$wb["backup_job_manual_txt"] = 'Manual';
+$wb["backup_job_auto_txt"] = 'Auto';
+$wb["manual_backup_title_txt"] = 'Manual backup';
+$wb["make_backup_web_txt"] = 'Make backup of web files';
+$wb["make_backup_database_txt"] = 'Make backup of databases';
+$wb["make_backup_confirm_txt"] = 'You are about to start a manual backup process. Manual backups count towards the total number of allowed backup copies: therefore if the limit will be exceeded, then oldest backups may be deleted automatically. Proceed?';
+$wb["yes_txt"] = 'Yes';
+$wb["no_txt"] = 'No';
+$wb["backup_is_encrypted_txt"] = "Encrypted";
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
+$wb["backup_format_rar_txt"] = 'RAR';
 ?>
diff --git a/interface/web/sites/lib/lang/ca_web_vhost_domain.lng b/interface/web/sites/lib/lang/ca_web_vhost_domain.lng
index 40fda06d11..d0a5a58bd3 100644
--- a/interface/web/sites/lib/lang/ca_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/ca_web_vhost_domain.lng
@@ -156,4 +156,31 @@ $wb['log_retention_txt'] = 'Logfiles retention time';
 $wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
 $wb['limit_web_quota_not_0_txt'] = 'Harddisk Quota cannot be set to 0.';
 $wb['proxy_protocol_txt'] = 'Enable PROXY Protocol';
+$wb["backup_format_web_txt"] = 'Backup format for web files';
+$wb["backup_format_db_txt"] = 'Backup format for database';
+$wb["backup_format_web_note_txt"] = 'In "default" mode ISPConfig has the following behaviour: if backup mode is set as web user, then "zip" format is used for web files, otherwise backup mode is set as root user and "tar (gzip)" format is used; database is compressed in "gzip" format. Only "tar" based formats and "rar" preserve file ownership and permissions of web files and guarantee correct restore.';
+$wb["backup_missing_utils_txt"] = 'Note: some utils are missing in the system that may prevent you from using some compression formats. Please, install the following utils to avoid possible backup problems: ';
+$wb["backup_compression_options_txt"] = 'Compression options';
+$wb["backup_encryption_note_txt"] = "Encryption is available only for the following backup formats: \"7z\", \"RAR\", \"zip\" (not secure). If any other format is used then encryption can't be applied and encryption settings are ignored. You can safely change the password at anytime: the \"Restore\" button will still work for old backups encrypted with a previous password. You don't need to type a password to restore backups using the \"Restore\" button. Password is required when you extract the archives manually. Please, don't forget your password, because it's impossible to restore it.";
+$wb["backup_encryption_options_txt"] = 'Encryption options';
+$wb["backup_enable_encryption_txt"] = 'Enable encryption';
+$wb["backup_password_txt"] = 'Password';
+$wb["backup_format_default_txt"] = 'Default: zip (deflate) or tar (gzip)';
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_rar_txt"] = 'RAR';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
 ?>
diff --git a/interface/web/sites/lib/lang/cz_web_backup_list.lng b/interface/web/sites/lib/lang/cz_web_backup_list.lng
index d30e41d961..e881afca12 100644
--- a/interface/web/sites/lib/lang/cz_web_backup_list.lng
+++ b/interface/web/sites/lib/lang/cz_web_backup_list.lng
@@ -18,4 +18,36 @@ $wb['delete_info_txt'] = 'Bylo zahájeno odstranění zálohy. Tato akce může
 $wb['delete_confirm_txt'] = 'Opravdu chcete smazat tuto zálohu ?';
 $wb['delete_pending_txt'] = 'Již existuje čekající úloha pro odstranění zálohy.';
 $wb['backup_type_mongodb'] = 'MongoDB Database';
+$wb['backup_pending_txt'] = 'There is already a pending backup job.';
+$wb['error_txt'] = 'Error';
+$wb['backup_info_txt'] = 'A backup process started. This action can take several minutes to complete.';
+$wb["backup_format_txt"] = 'Backup format';
+$wb["backup_format_unknown_txt"] = 'Unknown';
+$wb["backup_job_txt"] = 'Scheduler';
+$wb["backup_job_manual_txt"] = 'Manual';
+$wb["backup_job_auto_txt"] = 'Auto';
+$wb["manual_backup_title_txt"] = 'Manual backup';
+$wb["make_backup_web_txt"] = 'Make backup of web files';
+$wb["make_backup_database_txt"] = 'Make backup of databases';
+$wb["make_backup_confirm_txt"] = 'You are about to start a manual backup process. Manual backups count towards the total number of allowed backup copies: therefore if the limit will be exceeded, then oldest backups may be deleted automatically. Proceed?';
+$wb["yes_txt"] = 'Yes';
+$wb["no_txt"] = 'No';
+$wb["backup_is_encrypted_txt"] = "Encrypted";
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
+$wb["backup_format_rar_txt"] = 'RAR';
 ?>
diff --git a/interface/web/sites/lib/lang/cz_web_vhost_domain.lng b/interface/web/sites/lib/lang/cz_web_vhost_domain.lng
index 5e6ed3e756..250f98c890 100644
--- a/interface/web/sites/lib/lang/cz_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/cz_web_vhost_domain.lng
@@ -156,4 +156,31 @@ $wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min.
 $wb['domain_error_acme_invalid'] = 'Domain name acme.invalid not permitted.';
 $wb['limit_web_quota_not_0_txt'] = 'Harddisk Quota cannot be set to 0.';
 $wb['proxy_protocol_txt'] = 'Enable PROXY Protocol';
+$wb["backup_format_web_txt"] = 'Backup format for web files';
+$wb["backup_format_db_txt"] = 'Backup format for database';
+$wb["backup_format_web_note_txt"] = 'In "default" mode ISPConfig has the following behaviour: if backup mode is set as web user, then "zip" format is used for web files, otherwise backup mode is set as root user and "tar (gzip)" format is used; database is compressed in "gzip" format. Only "tar" based formats and "rar" preserve file ownership and permissions of web files and guarantee correct restore.';
+$wb["backup_missing_utils_txt"] = 'Note: some utils are missing in the system that may prevent you from using some compression formats. Please, install the following utils to avoid possible backup problems: ';
+$wb["backup_compression_options_txt"] = 'Compression options';
+$wb["backup_encryption_note_txt"] = "Encryption is available only for the following backup formats: \"7z\", \"RAR\", \"zip\" (not secure). If any other format is used then encryption can't be applied and encryption settings are ignored. You can safely change the password at anytime: the \"Restore\" button will still work for old backups encrypted with a previous password. You don't need to type a password to restore backups using the \"Restore\" button. Password is required when you extract the archives manually. Please, don't forget your password, because it's impossible to restore it.";
+$wb["backup_encryption_options_txt"] = 'Encryption options';
+$wb["backup_enable_encryption_txt"] = 'Enable encryption';
+$wb["backup_password_txt"] = 'Password';
+$wb["backup_format_default_txt"] = 'Default: zip (deflate) or tar (gzip)';
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_rar_txt"] = 'RAR';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
 ?>
diff --git a/interface/web/sites/lib/lang/de_web_backup_list.lng b/interface/web/sites/lib/lang/de_web_backup_list.lng
index 63b27051bb..3c38207b76 100644
--- a/interface/web/sites/lib/lang/de_web_backup_list.lng
+++ b/interface/web/sites/lib/lang/de_web_backup_list.lng
@@ -18,4 +18,36 @@ $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['filesize_txt'] = 'Filesize';
+$wb['backup_pending_txt'] = 'There is already a pending backup job.';
+$wb['error_txt'] = 'Error';
+$wb['backup_info_txt'] = 'A backup process started. This action can take several minutes to complete.';
+$wb["backup_format_txt"] = 'Backup format';
+$wb["backup_format_unknown_txt"] = 'Unknown';
+$wb["backup_job_txt"] = 'Scheduler';
+$wb["backup_job_manual_txt"] = 'Manual';
+$wb["backup_job_auto_txt"] = 'Auto';
+$wb["manual_backup_title_txt"] = 'Manual backup';
+$wb["make_backup_web_txt"] = 'Make backup of web files';
+$wb["make_backup_database_txt"] = 'Make backup of databases';
+$wb["make_backup_confirm_txt"] = 'You are about to start a manual backup process. Manual backups count towards the total number of allowed backup copies: therefore if the limit will be exceeded, then oldest backups may be deleted automatically. Proceed?';
+$wb["yes_txt"] = 'Yes';
+$wb["no_txt"] = 'No';
+$wb["backup_is_encrypted_txt"] = "Encrypted";
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
+$wb["backup_format_rar_txt"] = 'RAR';
 ?>
diff --git a/interface/web/sites/lib/lang/de_web_vhost_domain.lng b/interface/web/sites/lib/lang/de_web_vhost_domain.lng
index b5fef5aa15..e4424799a6 100644
--- a/interface/web/sites/lib/lang/de_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/de_web_vhost_domain.lng
@@ -156,4 +156,31 @@ $wb['log_retention_txt'] = 'Log-Dateien Aufbewahrungszeit';
 $wb['log_retention_error_regex'] = 'Aufbewahrungszeit in Tagen (Erlaubte Werte: min. 0 - max. 9999)';
 $wb['limit_web_quota_not_0_txt'] = 'Harddisk Quota kann nicht 0 sein.';
 $wb['proxy_protocol_txt'] = 'Enable PROXY Protocol';
+$wb["backup_format_web_txt"] = 'Backup format for web files';
+$wb["backup_format_db_txt"] = 'Backup format for database';
+$wb["backup_format_web_note_txt"] = 'In "default" mode ISPConfig has the following behaviour: if backup mode is set as web user, then "zip" format is used for web files, otherwise backup mode is set as root user and "tar (gzip)" format is used; database is compressed in "gzip" format. Only "tar" based formats and "rar" preserve file ownership and permissions of web files and guarantee correct restore.';
+$wb["backup_missing_utils_txt"] = 'Note: some utils are missing in the system that may prevent you from using some compression formats. Please, install the following utils to avoid possible backup problems: ';
+$wb["backup_compression_options_txt"] = 'Compression options';
+$wb["backup_encryption_note_txt"] = "Encryption is available only for the following backup formats: \"7z\", \"RAR\", \"zip\" (not secure). If any other format is used then encryption can't be applied and encryption settings are ignored. You can safely change the password at anytime: the \"Restore\" button will still work for old backups encrypted with a previous password. You don't need to type a password to restore backups using the \"Restore\" button. Password is required when you extract the archives manually. Please, don't forget your password, because it's impossible to restore it.";
+$wb["backup_encryption_options_txt"] = 'Encryption options';
+$wb["backup_enable_encryption_txt"] = 'Enable encryption';
+$wb["backup_password_txt"] = 'Password';
+$wb["backup_format_default_txt"] = 'Default: zip (deflate) or tar (gzip)';
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_rar_txt"] = 'RAR';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
 ?>
diff --git a/interface/web/sites/lib/lang/dk_web_backup_list.lng b/interface/web/sites/lib/lang/dk_web_backup_list.lng
index eb45c4e89b..fb9f0e997f 100644
--- a/interface/web/sites/lib/lang/dk_web_backup_list.lng
+++ b/interface/web/sites/lib/lang/dk_web_backup_list.lng
@@ -18,4 +18,36 @@ $wb['delete_info_txt'] = 'Delete of the backup has been started. This action tak
 $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_pending_txt'] = 'There is already a pending backup job.';
+$wb['error_txt'] = 'Error';
+$wb['backup_info_txt'] = 'A backup process started. This action can take several minutes to complete.';
+$wb["backup_format_txt"] = 'Backup format';
+$wb["backup_format_unknown_txt"] = 'Unknown';
+$wb["backup_job_txt"] = 'Scheduler';
+$wb["backup_job_manual_txt"] = 'Manual';
+$wb["backup_job_auto_txt"] = 'Auto';
+$wb["manual_backup_title_txt"] = 'Manual backup';
+$wb["make_backup_web_txt"] = 'Make backup of web files';
+$wb["make_backup_database_txt"] = 'Make backup of databases';
+$wb["make_backup_confirm_txt"] = 'You are about to start a manual backup process. Manual backups count towards the total number of allowed backup copies: therefore if the limit will be exceeded, then oldest backups may be deleted automatically. Proceed?';
+$wb["yes_txt"] = 'Yes';
+$wb["no_txt"] = 'No';
+$wb["backup_is_encrypted_txt"] = "Encrypted";
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
+$wb["backup_format_rar_txt"] = 'RAR';
 ?>
diff --git a/interface/web/sites/lib/lang/dk_web_vhost_domain.lng b/interface/web/sites/lib/lang/dk_web_vhost_domain.lng
index 40fda06d11..d0a5a58bd3 100644
--- a/interface/web/sites/lib/lang/dk_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/dk_web_vhost_domain.lng
@@ -156,4 +156,31 @@ $wb['log_retention_txt'] = 'Logfiles retention time';
 $wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
 $wb['limit_web_quota_not_0_txt'] = 'Harddisk Quota cannot be set to 0.';
 $wb['proxy_protocol_txt'] = 'Enable PROXY Protocol';
+$wb["backup_format_web_txt"] = 'Backup format for web files';
+$wb["backup_format_db_txt"] = 'Backup format for database';
+$wb["backup_format_web_note_txt"] = 'In "default" mode ISPConfig has the following behaviour: if backup mode is set as web user, then "zip" format is used for web files, otherwise backup mode is set as root user and "tar (gzip)" format is used; database is compressed in "gzip" format. Only "tar" based formats and "rar" preserve file ownership and permissions of web files and guarantee correct restore.';
+$wb["backup_missing_utils_txt"] = 'Note: some utils are missing in the system that may prevent you from using some compression formats. Please, install the following utils to avoid possible backup problems: ';
+$wb["backup_compression_options_txt"] = 'Compression options';
+$wb["backup_encryption_note_txt"] = "Encryption is available only for the following backup formats: \"7z\", \"RAR\", \"zip\" (not secure). If any other format is used then encryption can't be applied and encryption settings are ignored. You can safely change the password at anytime: the \"Restore\" button will still work for old backups encrypted with a previous password. You don't need to type a password to restore backups using the \"Restore\" button. Password is required when you extract the archives manually. Please, don't forget your password, because it's impossible to restore it.";
+$wb["backup_encryption_options_txt"] = 'Encryption options';
+$wb["backup_enable_encryption_txt"] = 'Enable encryption';
+$wb["backup_password_txt"] = 'Password';
+$wb["backup_format_default_txt"] = 'Default: zip (deflate) or tar (gzip)';
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_rar_txt"] = 'RAR';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
 ?>
diff --git a/interface/web/sites/lib/lang/el_web_backup_list.lng b/interface/web/sites/lib/lang/el_web_backup_list.lng
index d1133334f0..056c7576ae 100644
--- a/interface/web/sites/lib/lang/el_web_backup_list.lng
+++ b/interface/web/sites/lib/lang/el_web_backup_list.lng
@@ -18,4 +18,36 @@ $wb['backup_type_mysql'] = 'MySQL Database';
 $wb['backup_type_web'] = 'Website files';
 $wb['filesize_txt'] = 'Filesize';
 $wb['backup_type_mongodb'] = 'MongoDB Database';
+$wb['backup_pending_txt'] = 'There is already a pending backup job.';
+$wb['error_txt'] = 'Error';
+$wb['backup_info_txt'] = 'A backup process started. This action can take several minutes to complete.';
+$wb["backup_format_txt"] = 'Backup format';
+$wb["backup_format_unknown_txt"] = 'Unknown';
+$wb["backup_job_txt"] = 'Scheduler';
+$wb["backup_job_manual_txt"] = 'Manual';
+$wb["backup_job_auto_txt"] = 'Auto';
+$wb["manual_backup_title_txt"] = 'Manual backup';
+$wb["make_backup_web_txt"] = 'Make backup of web files';
+$wb["make_backup_database_txt"] = 'Make backup of databases';
+$wb["make_backup_confirm_txt"] = 'You are about to start a manual backup process. Manual backups count towards the total number of allowed backup copies: therefore if the limit will be exceeded, then oldest backups may be deleted automatically. Proceed?';
+$wb["yes_txt"] = 'Yes';
+$wb["no_txt"] = 'No';
+$wb["backup_is_encrypted_txt"] = "Encrypted";
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
+$wb["backup_format_rar_txt"] = 'RAR';
 ?>
diff --git a/interface/web/sites/lib/lang/el_web_vhost_domain.lng b/interface/web/sites/lib/lang/el_web_vhost_domain.lng
index 4fc9e15107..d4cb988a17 100644
--- a/interface/web/sites/lib/lang/el_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/el_web_vhost_domain.lng
@@ -156,4 +156,31 @@ $wb['log_retention_txt'] = 'Logfiles retention time';
 $wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
 $wb['limit_web_quota_not_0_txt'] = 'Harddisk Quota cannot be set to 0.';
 $wb['proxy_protocol_txt'] = 'Enable PROXY Protocol';
+$wb["backup_format_web_txt"] = 'Backup format for web files';
+$wb["backup_format_db_txt"] = 'Backup format for database';
+$wb["backup_format_web_note_txt"] = 'In "default" mode ISPConfig has the following behaviour: if backup mode is set as web user, then "zip" format is used for web files, otherwise backup mode is set as root user and "tar (gzip)" format is used; database is compressed in "gzip" format. Only "tar" based formats and "rar" preserve file ownership and permissions of web files and guarantee correct restore.';
+$wb["backup_missing_utils_txt"] = 'Note: some utils are missing in the system that may prevent you from using some compression formats. Please, install the following utils to avoid possible backup problems: ';
+$wb["backup_compression_options_txt"] = 'Compression options';
+$wb["backup_encryption_note_txt"] = "Encryption is available only for the following backup formats: \"7z\", \"RAR\", \"zip\" (not secure). If any other format is used then encryption can't be applied and encryption settings are ignored. You can safely change the password at anytime: the \"Restore\" button will still work for old backups encrypted with a previous password. You don't need to type a password to restore backups using the \"Restore\" button. Password is required when you extract the archives manually. Please, don't forget your password, because it's impossible to restore it.";
+$wb["backup_encryption_options_txt"] = 'Encryption options';
+$wb["backup_enable_encryption_txt"] = 'Enable encryption';
+$wb["backup_password_txt"] = 'Password';
+$wb["backup_format_default_txt"] = 'Default: zip (deflate) or tar (gzip)';
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_rar_txt"] = 'RAR';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
 ?>
diff --git a/interface/web/sites/lib/lang/en_web_backup_list.lng b/interface/web/sites/lib/lang/en_web_backup_list.lng
index 6ec5f5f3c7..f541108807 100644
--- a/interface/web/sites/lib/lang/en_web_backup_list.lng
+++ b/interface/web/sites/lib/lang/en_web_backup_list.lng
@@ -3,7 +3,7 @@ $wb['list_head_txt'] = 'Existing backups';
 $wb['date_txt'] = 'Date';
 $wb['backup_type_txt'] = 'Type';
 $wb['filename_txt'] = 'Backup file';
-$wb['filesize_txt'] = 'Filesize';
+$wb['filesize_txt'] = 'File size';
 $wb['restore_backup_txt'] = 'Restore';
 $wb['download_backup_txt'] = 'Download';
 $wb['download_info_txt'] = 'The backup file will be available for download in the backup folder of the website in a few minutes.';
@@ -18,5 +18,36 @@ $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';
-
+$wb['backup_pending_txt'] = 'There is already a pending backup job.';
+$wb['error_txt'] = 'Error';
+$wb['backup_info_txt'] = 'A backup process started. This action can take several minutes to complete.';
+$wb["backup_format_txt"] = 'Backup format';
+$wb["backup_format_unknown_txt"] = 'Unknown';
+$wb["backup_job_txt"] = 'Scheduler';
+$wb["backup_job_manual_txt"] = 'Manual';
+$wb["backup_job_auto_txt"] = 'Auto';
+$wb["manual_backup_title_txt"] = 'Manual backup';
+$wb["make_backup_web_txt"] = 'Make backup of web files';
+$wb["make_backup_database_txt"] = 'Make backup of databases';
+$wb["make_backup_confirm_txt"] = 'You are about to start a manual backup process. Manual backups count towards the total number of allowed backup copies: therefore if the limit will be exceeded, then oldest backups may be deleted automatically. Proceed?';
+$wb["yes_txt"] = 'Yes';
+$wb["no_txt"] = 'No';
+$wb["backup_is_encrypted_txt"] = "Encrypted";
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
+$wb["backup_format_rar_txt"] = 'RAR';
 ?>
diff --git a/interface/web/sites/lib/lang/en_web_vhost_domain.lng b/interface/web/sites/lib/lang/en_web_vhost_domain.lng
index 985a1abcf2..66bfd1ca19 100644
--- a/interface/web/sites/lib/lang/en_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/en_web_vhost_domain.lng
@@ -161,4 +161,31 @@ $wb['log_retention_txt'] = 'Logfiles retention time';
 $wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
 $wb['limit_web_quota_not_0_txt'] = 'Harddisk Quota cannot be set to 0.';
 $wb['proxy_protocol_txt'] = 'Enable PROXY Protocol';
+$wb["backup_format_web_txt"] = 'Backup format for web files';
+$wb["backup_format_db_txt"] = 'Backup format for database';
+$wb["backup_format_web_note_txt"] = 'In "default" mode ISPConfig has the following behaviour: if backup mode is set as web user, then "zip" format is used for web files, otherwise backup mode is set as root user and "tar (gzip)" format is used; database is compressed in "gzip" format. Only "tar" based formats and "rar" preserve file ownership and permissions of web files and guarantee correct restore.';
+$wb["backup_missing_utils_txt"] = 'Note: some utils are missing in the system that may prevent you from using some compression formats. Please, install the following utils to avoid possible backup problems: ';
+$wb["backup_compression_options_txt"] = 'Compression options';
+$wb["backup_encryption_note_txt"] = "Encryption is available only for the following backup formats: \"7z\", \"RAR\", \"zip\" (not secure). If any other format is used then encryption can't be applied and encryption settings are ignored. You can safely change the password at anytime: the \"Restore\" button will still work for old backups encrypted with a previous password. You don't need to type a password to restore backups using the \"Restore\" button. Password is required when you extract the archives manually. Please, don't forget your password, because it's impossible to restore it.";
+$wb["backup_encryption_options_txt"] = 'Encryption options';
+$wb["backup_enable_encryption_txt"] = 'Enable encryption';
+$wb["backup_password_txt"] = 'Password';
+$wb["backup_format_default_txt"] = 'Default: zip (deflate) or tar (gzip)';
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_rar_txt"] = 'RAR';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
 ?>
diff --git a/interface/web/sites/lib/lang/es_web_backup_list.lng b/interface/web/sites/lib/lang/es_web_backup_list.lng
index 04896d9eba..931ada712b 100644
--- a/interface/web/sites/lib/lang/es_web_backup_list.lng
+++ b/interface/web/sites/lib/lang/es_web_backup_list.lng
@@ -18,4 +18,36 @@ $wb['backup_type_mysql'] = 'Base de datos MySQL';
 $wb['backup_type_web'] = 'Archivos del sitio web';
 $wb['filesize_txt'] = 'Filesize';
 $wb['backup_type_mongodb'] = 'MongoDB Database';
+$wb['backup_pending_txt'] = 'There is already a pending backup job.';
+$wb['error_txt'] = 'Error';
+$wb['backup_info_txt'] = 'A backup process started. This action can take several minutes to complete.';
+$wb["backup_format_txt"] = 'Backup format';
+$wb["backup_format_unknown_txt"] = 'Unknown';
+$wb["backup_job_txt"] = 'Scheduler';
+$wb["backup_job_manual_txt"] = 'Manual';
+$wb["backup_job_auto_txt"] = 'Auto';
+$wb["manual_backup_title_txt"] = 'Manual backup';
+$wb["make_backup_web_txt"] = 'Make backup of web files';
+$wb["make_backup_database_txt"] = 'Make backup of databases';
+$wb["make_backup_confirm_txt"] = 'You are about to start a manual backup process. Manual backups count towards the total number of allowed backup copies: therefore if the limit will be exceeded, then oldest backups may be deleted automatically. Proceed?';
+$wb["yes_txt"] = 'Yes';
+$wb["no_txt"] = 'No';
+$wb["backup_is_encrypted_txt"] = "Encrypted";
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
+$wb["backup_format_rar_txt"] = 'RAR';
 ?>
diff --git a/interface/web/sites/lib/lang/es_web_vhost_domain.lng b/interface/web/sites/lib/lang/es_web_vhost_domain.lng
index d6de7b8088..504bea2aa6 100644
--- a/interface/web/sites/lib/lang/es_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/es_web_vhost_domain.lng
@@ -156,4 +156,31 @@ $wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min.
 $wb['domain_error_acme_invalid'] = 'Domain name acme.invalid not permitted.';
 $wb['limit_web_quota_not_0_txt'] = 'Harddisk Quota cannot be set to 0.';
 $wb['proxy_protocol_txt'] = 'Enable PROXY Protocol';
+$wb["backup_format_web_txt"] = 'Backup format for web files';
+$wb["backup_format_db_txt"] = 'Backup format for database';
+$wb["backup_format_web_note_txt"] = 'In "default" mode ISPConfig has the following behaviour: if backup mode is set as web user, then "zip" format is used for web files, otherwise backup mode is set as root user and "tar (gzip)" format is used; database is compressed in "gzip" format. Only "tar" based formats and "rar" preserve file ownership and permissions of web files and guarantee correct restore.';
+$wb["backup_missing_utils_txt"] = 'Note: some utils are missing in the system that may prevent you from using some compression formats. Please, install the following utils to avoid possible backup problems: ';
+$wb["backup_compression_options_txt"] = 'Compression options';
+$wb["backup_encryption_note_txt"] = "Encryption is available only for the following backup formats: \"7z\", \"RAR\", \"zip\" (not secure). If any other format is used then encryption can't be applied and encryption settings are ignored. You can safely change the password at anytime: the \"Restore\" button will still work for old backups encrypted with a previous password. You don't need to type a password to restore backups using the \"Restore\" button. Password is required when you extract the archives manually. Please, don't forget your password, because it's impossible to restore it.";
+$wb["backup_encryption_options_txt"] = 'Encryption options';
+$wb["backup_enable_encryption_txt"] = 'Enable encryption';
+$wb["backup_password_txt"] = 'Password';
+$wb["backup_format_default_txt"] = 'Default: zip (deflate) or tar (gzip)';
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_rar_txt"] = 'RAR';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
 ?>
diff --git a/interface/web/sites/lib/lang/fi_web_backup_list.lng b/interface/web/sites/lib/lang/fi_web_backup_list.lng
index d1133334f0..056c7576ae 100644
--- a/interface/web/sites/lib/lang/fi_web_backup_list.lng
+++ b/interface/web/sites/lib/lang/fi_web_backup_list.lng
@@ -18,4 +18,36 @@ $wb['backup_type_mysql'] = 'MySQL Database';
 $wb['backup_type_web'] = 'Website files';
 $wb['filesize_txt'] = 'Filesize';
 $wb['backup_type_mongodb'] = 'MongoDB Database';
+$wb['backup_pending_txt'] = 'There is already a pending backup job.';
+$wb['error_txt'] = 'Error';
+$wb['backup_info_txt'] = 'A backup process started. This action can take several minutes to complete.';
+$wb["backup_format_txt"] = 'Backup format';
+$wb["backup_format_unknown_txt"] = 'Unknown';
+$wb["backup_job_txt"] = 'Scheduler';
+$wb["backup_job_manual_txt"] = 'Manual';
+$wb["backup_job_auto_txt"] = 'Auto';
+$wb["manual_backup_title_txt"] = 'Manual backup';
+$wb["make_backup_web_txt"] = 'Make backup of web files';
+$wb["make_backup_database_txt"] = 'Make backup of databases';
+$wb["make_backup_confirm_txt"] = 'You are about to start a manual backup process. Manual backups count towards the total number of allowed backup copies: therefore if the limit will be exceeded, then oldest backups may be deleted automatically. Proceed?';
+$wb["yes_txt"] = 'Yes';
+$wb["no_txt"] = 'No';
+$wb["backup_is_encrypted_txt"] = "Encrypted";
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
+$wb["backup_format_rar_txt"] = 'RAR';
 ?>
diff --git a/interface/web/sites/lib/lang/fi_web_vhost_domain.lng b/interface/web/sites/lib/lang/fi_web_vhost_domain.lng
index 3c9dfc5578..460fbadff7 100644
--- a/interface/web/sites/lib/lang/fi_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/fi_web_vhost_domain.lng
@@ -156,4 +156,31 @@ $wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min.
 $wb['domain_error_acme_invalid'] = 'Domain name acme.invalid not permitted.';
 $wb['limit_web_quota_not_0_txt'] = 'Harddisk Quota cannot be set to 0.';
 $wb['proxy_protocol_txt'] = 'Enable PROXY Protocol';
+$wb["backup_format_web_txt"] = 'Backup format for web files';
+$wb["backup_format_db_txt"] = 'Backup format for database';
+$wb["backup_format_web_note_txt"] = 'In "default" mode ISPConfig has the following behaviour: if backup mode is set as web user, then "zip" format is used for web files, otherwise backup mode is set as root user and "tar (gzip)" format is used; database is compressed in "gzip" format. Only "tar" based formats and "rar" preserve file ownership and permissions of web files and guarantee correct restore.';
+$wb["backup_missing_utils_txt"] = 'Note: some utils are missing in the system that may prevent you from using some compression formats. Please, install the following utils to avoid possible backup problems: ';
+$wb["backup_compression_options_txt"] = 'Compression options';
+$wb["backup_encryption_note_txt"] = "Encryption is available only for the following backup formats: \"7z\", \"RAR\", \"zip\" (not secure). If any other format is used then encryption can't be applied and encryption settings are ignored. You can safely change the password at anytime: the \"Restore\" button will still work for old backups encrypted with a previous password. You don't need to type a password to restore backups using the \"Restore\" button. Password is required when you extract the archives manually. Please, don't forget your password, because it's impossible to restore it.";
+$wb["backup_encryption_options_txt"] = 'Encryption options';
+$wb["backup_enable_encryption_txt"] = 'Enable encryption';
+$wb["backup_password_txt"] = 'Password';
+$wb["backup_format_default_txt"] = 'Default: zip (deflate) or tar (gzip)';
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_rar_txt"] = 'RAR';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
 ?>
diff --git a/interface/web/sites/lib/lang/fr_web_backup_list.lng b/interface/web/sites/lib/lang/fr_web_backup_list.lng
index 6f1c5e1348..92e44845ae 100644
--- a/interface/web/sites/lib/lang/fr_web_backup_list.lng
+++ b/interface/web/sites/lib/lang/fr_web_backup_list.lng
@@ -18,4 +18,36 @@ $wb['delete_info_txt'] = 'Delete of the backup has been started. This action tak
 $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_pending_txt'] = 'There is already a pending backup job.';
+$wb['error_txt'] = 'Error';
+$wb['backup_info_txt'] = 'A backup process started. This action can take several minutes to complete.';
+$wb["backup_format_txt"] = 'Backup format';
+$wb["backup_format_unknown_txt"] = 'Unknown';
+$wb["backup_job_txt"] = 'Scheduler';
+$wb["backup_job_manual_txt"] = 'Manual';
+$wb["backup_job_auto_txt"] = 'Auto';
+$wb["manual_backup_title_txt"] = 'Manual backup';
+$wb["make_backup_web_txt"] = 'Make backup of web files';
+$wb["make_backup_database_txt"] = 'Make backup of databases';
+$wb["make_backup_confirm_txt"] = 'You are about to start a manual backup process. Manual backups count towards the total number of allowed backup copies: therefore if the limit will be exceeded, then oldest backups may be deleted automatically. Proceed?';
+$wb["yes_txt"] = 'Yes';
+$wb["no_txt"] = 'No';
+$wb["backup_is_encrypted_txt"] = "Encrypted";
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
+$wb["backup_format_rar_txt"] = 'RAR';
 ?>
diff --git a/interface/web/sites/lib/lang/fr_web_vhost_domain.lng b/interface/web/sites/lib/lang/fr_web_vhost_domain.lng
index 91a806f870..306a48aedc 100644
--- a/interface/web/sites/lib/lang/fr_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/fr_web_vhost_domain.lng
@@ -156,4 +156,31 @@ $wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min.
 $wb['domain_error_acme_invalid'] = 'Domain name acme.invalid not permitted.';
 $wb['limit_web_quota_not_0_txt'] = 'Harddisk Quota cannot be set to 0.';
 $wb['proxy_protocol_txt'] = 'Enable PROXY Protocol';
+$wb["backup_format_web_txt"] = 'Backup format for web files';
+$wb["backup_format_db_txt"] = 'Backup format for database';
+$wb["backup_format_web_note_txt"] = 'In "default" mode ISPConfig has the following behaviour: if backup mode is set as web user, then "zip" format is used for web files, otherwise backup mode is set as root user and "tar (gzip)" format is used; database is compressed in "gzip" format. Only "tar" based formats and "rar" preserve file ownership and permissions of web files and guarantee correct restore.';
+$wb["backup_missing_utils_txt"] = 'Note: some utils are missing in the system that may prevent you from using some compression formats. Please, install the following utils to avoid possible backup problems: ';
+$wb["backup_compression_options_txt"] = 'Compression options';
+$wb["backup_encryption_note_txt"] = "Encryption is available only for the following backup formats: \"7z\", \"RAR\", \"zip\" (not secure). If any other format is used then encryption can't be applied and encryption settings are ignored. You can safely change the password at anytime: the \"Restore\" button will still work for old backups encrypted with a previous password. You don't need to type a password to restore backups using the \"Restore\" button. Password is required when you extract the archives manually. Please, don't forget your password, because it's impossible to restore it.";
+$wb["backup_encryption_options_txt"] = 'Encryption options';
+$wb["backup_enable_encryption_txt"] = 'Enable encryption';
+$wb["backup_password_txt"] = 'Password';
+$wb["backup_format_default_txt"] = 'Default: zip (deflate) or tar (gzip)';
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_rar_txt"] = 'RAR';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
 ?>
diff --git a/interface/web/sites/lib/lang/hr_web_backup_list.lng b/interface/web/sites/lib/lang/hr_web_backup_list.lng
index d1133334f0..056c7576ae 100644
--- a/interface/web/sites/lib/lang/hr_web_backup_list.lng
+++ b/interface/web/sites/lib/lang/hr_web_backup_list.lng
@@ -18,4 +18,36 @@ $wb['backup_type_mysql'] = 'MySQL Database';
 $wb['backup_type_web'] = 'Website files';
 $wb['filesize_txt'] = 'Filesize';
 $wb['backup_type_mongodb'] = 'MongoDB Database';
+$wb['backup_pending_txt'] = 'There is already a pending backup job.';
+$wb['error_txt'] = 'Error';
+$wb['backup_info_txt'] = 'A backup process started. This action can take several minutes to complete.';
+$wb["backup_format_txt"] = 'Backup format';
+$wb["backup_format_unknown_txt"] = 'Unknown';
+$wb["backup_job_txt"] = 'Scheduler';
+$wb["backup_job_manual_txt"] = 'Manual';
+$wb["backup_job_auto_txt"] = 'Auto';
+$wb["manual_backup_title_txt"] = 'Manual backup';
+$wb["make_backup_web_txt"] = 'Make backup of web files';
+$wb["make_backup_database_txt"] = 'Make backup of databases';
+$wb["make_backup_confirm_txt"] = 'You are about to start a manual backup process. Manual backups count towards the total number of allowed backup copies: therefore if the limit will be exceeded, then oldest backups may be deleted automatically. Proceed?';
+$wb["yes_txt"] = 'Yes';
+$wb["no_txt"] = 'No';
+$wb["backup_is_encrypted_txt"] = "Encrypted";
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
+$wb["backup_format_rar_txt"] = 'RAR';
 ?>
diff --git a/interface/web/sites/lib/lang/hr_web_vhost_domain.lng b/interface/web/sites/lib/lang/hr_web_vhost_domain.lng
index 3874c876f1..d883532397 100644
--- a/interface/web/sites/lib/lang/hr_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/hr_web_vhost_domain.lng
@@ -156,4 +156,31 @@ $wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min.
 $wb['domain_error_acme_invalid'] = 'Domain name acme.invalid not permitted.';
 $wb['limit_web_quota_not_0_txt'] = 'Harddisk Quota cannot be set to 0.';
 $wb['proxy_protocol_txt'] = 'Enable PROXY Protocol';
+$wb["backup_format_web_txt"] = 'Backup format for web files';
+$wb["backup_format_db_txt"] = 'Backup format for database';
+$wb["backup_format_web_note_txt"] = 'In "default" mode ISPConfig has the following behaviour: if backup mode is set as web user, then "zip" format is used for web files, otherwise backup mode is set as root user and "tar (gzip)" format is used; database is compressed in "gzip" format. Only "tar" based formats and "rar" preserve file ownership and permissions of web files and guarantee correct restore.';
+$wb["backup_missing_utils_txt"] = 'Note: some utils are missing in the system that may prevent you from using some compression formats. Please, install the following utils to avoid possible backup problems: ';
+$wb["backup_compression_options_txt"] = 'Compression options';
+$wb["backup_encryption_note_txt"] = "Encryption is available only for the following backup formats: \"7z\", \"RAR\", \"zip\" (not secure). If any other format is used then encryption can't be applied and encryption settings are ignored. You can safely change the password at anytime: the \"Restore\" button will still work for old backups encrypted with a previous password. You don't need to type a password to restore backups using the \"Restore\" button. Password is required when you extract the archives manually. Please, don't forget your password, because it's impossible to restore it.";
+$wb["backup_encryption_options_txt"] = 'Encryption options';
+$wb["backup_enable_encryption_txt"] = 'Enable encryption';
+$wb["backup_password_txt"] = 'Password';
+$wb["backup_format_default_txt"] = 'Default: zip (deflate) or tar (gzip)';
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_rar_txt"] = 'RAR';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
 ?>
diff --git a/interface/web/sites/lib/lang/hu_web_backup_list.lng b/interface/web/sites/lib/lang/hu_web_backup_list.lng
index d1133334f0..056c7576ae 100644
--- a/interface/web/sites/lib/lang/hu_web_backup_list.lng
+++ b/interface/web/sites/lib/lang/hu_web_backup_list.lng
@@ -18,4 +18,36 @@ $wb['backup_type_mysql'] = 'MySQL Database';
 $wb['backup_type_web'] = 'Website files';
 $wb['filesize_txt'] = 'Filesize';
 $wb['backup_type_mongodb'] = 'MongoDB Database';
+$wb['backup_pending_txt'] = 'There is already a pending backup job.';
+$wb['error_txt'] = 'Error';
+$wb['backup_info_txt'] = 'A backup process started. This action can take several minutes to complete.';
+$wb["backup_format_txt"] = 'Backup format';
+$wb["backup_format_unknown_txt"] = 'Unknown';
+$wb["backup_job_txt"] = 'Scheduler';
+$wb["backup_job_manual_txt"] = 'Manual';
+$wb["backup_job_auto_txt"] = 'Auto';
+$wb["manual_backup_title_txt"] = 'Manual backup';
+$wb["make_backup_web_txt"] = 'Make backup of web files';
+$wb["make_backup_database_txt"] = 'Make backup of databases';
+$wb["make_backup_confirm_txt"] = 'You are about to start a manual backup process. Manual backups count towards the total number of allowed backup copies: therefore if the limit will be exceeded, then oldest backups may be deleted automatically. Proceed?';
+$wb["yes_txt"] = 'Yes';
+$wb["no_txt"] = 'No';
+$wb["backup_is_encrypted_txt"] = "Encrypted";
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
+$wb["backup_format_rar_txt"] = 'RAR';
 ?>
diff --git a/interface/web/sites/lib/lang/hu_web_vhost_domain.lng b/interface/web/sites/lib/lang/hu_web_vhost_domain.lng
index d14356efef..4d54b0a4c7 100644
--- a/interface/web/sites/lib/lang/hu_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/hu_web_vhost_domain.lng
@@ -156,4 +156,31 @@ $wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min.
 $wb['domain_error_acme_invalid'] = 'Domain name acme.invalid not permitted.';
 $wb['limit_web_quota_not_0_txt'] = 'Harddisk Quota cannot be set to 0.';
 $wb['proxy_protocol_txt'] = 'Enable PROXY Protocol';
+$wb["backup_format_web_txt"] = 'Backup format for web files';
+$wb["backup_format_db_txt"] = 'Backup format for database';
+$wb["backup_format_web_note_txt"] = 'In "default" mode ISPConfig has the following behaviour: if backup mode is set as web user, then "zip" format is used for web files, otherwise backup mode is set as root user and "tar (gzip)" format is used; database is compressed in "gzip" format. Only "tar" based formats and "rar" preserve file ownership and permissions of web files and guarantee correct restore.';
+$wb["backup_missing_utils_txt"] = 'Note: some utils are missing in the system that may prevent you from using some compression formats. Please, install the following utils to avoid possible backup problems: ';
+$wb["backup_compression_options_txt"] = 'Compression options';
+$wb["backup_encryption_note_txt"] = "Encryption is available only for the following backup formats: \"7z\", \"RAR\", \"zip\" (not secure). If any other format is used then encryption can't be applied and encryption settings are ignored. You can safely change the password at anytime: the \"Restore\" button will still work for old backups encrypted with a previous password. You don't need to type a password to restore backups using the \"Restore\" button. Password is required when you extract the archives manually. Please, don't forget your password, because it's impossible to restore it.";
+$wb["backup_encryption_options_txt"] = 'Encryption options';
+$wb["backup_enable_encryption_txt"] = 'Enable encryption';
+$wb["backup_password_txt"] = 'Password';
+$wb["backup_format_default_txt"] = 'Default: zip (deflate) or tar (gzip)';
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_rar_txt"] = 'RAR';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
 ?>
diff --git a/interface/web/sites/lib/lang/id_web_backup_list.lng b/interface/web/sites/lib/lang/id_web_backup_list.lng
index d1133334f0..056c7576ae 100644
--- a/interface/web/sites/lib/lang/id_web_backup_list.lng
+++ b/interface/web/sites/lib/lang/id_web_backup_list.lng
@@ -18,4 +18,36 @@ $wb['backup_type_mysql'] = 'MySQL Database';
 $wb['backup_type_web'] = 'Website files';
 $wb['filesize_txt'] = 'Filesize';
 $wb['backup_type_mongodb'] = 'MongoDB Database';
+$wb['backup_pending_txt'] = 'There is already a pending backup job.';
+$wb['error_txt'] = 'Error';
+$wb['backup_info_txt'] = 'A backup process started. This action can take several minutes to complete.';
+$wb["backup_format_txt"] = 'Backup format';
+$wb["backup_format_unknown_txt"] = 'Unknown';
+$wb["backup_job_txt"] = 'Scheduler';
+$wb["backup_job_manual_txt"] = 'Manual';
+$wb["backup_job_auto_txt"] = 'Auto';
+$wb["manual_backup_title_txt"] = 'Manual backup';
+$wb["make_backup_web_txt"] = 'Make backup of web files';
+$wb["make_backup_database_txt"] = 'Make backup of databases';
+$wb["make_backup_confirm_txt"] = 'You are about to start a manual backup process. Manual backups count towards the total number of allowed backup copies: therefore if the limit will be exceeded, then oldest backups may be deleted automatically. Proceed?';
+$wb["yes_txt"] = 'Yes';
+$wb["no_txt"] = 'No';
+$wb["backup_is_encrypted_txt"] = "Encrypted";
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
+$wb["backup_format_rar_txt"] = 'RAR';
 ?>
diff --git a/interface/web/sites/lib/lang/id_web_vhost_domain.lng b/interface/web/sites/lib/lang/id_web_vhost_domain.lng
index 0d7d7285ab..3aa65982cd 100644
--- a/interface/web/sites/lib/lang/id_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/id_web_vhost_domain.lng
@@ -156,4 +156,31 @@ $wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min.
 $wb['domain_error_acme_invalid'] = 'Domain name acme.invalid not permitted.';
 $wb['limit_web_quota_not_0_txt'] = 'Harddisk Quota cannot be set to 0.';
 $wb['proxy_protocol_txt'] = 'Enable PROXY Protocol';
+$wb["backup_format_web_txt"] = 'Backup format for web files';
+$wb["backup_format_db_txt"] = 'Backup format for database';
+$wb["backup_format_web_note_txt"] = 'In "default" mode ISPConfig has the following behaviour: if backup mode is set as web user, then "zip" format is used for web files, otherwise backup mode is set as root user and "tar (gzip)" format is used; database is compressed in "gzip" format. Only "tar" based formats and "rar" preserve file ownership and permissions of web files and guarantee correct restore.';
+$wb["backup_missing_utils_txt"] = 'Note: some utils are missing in the system that may prevent you from using some compression formats. Please, install the following utils to avoid possible backup problems: ';
+$wb["backup_compression_options_txt"] = 'Compression options';
+$wb["backup_encryption_note_txt"] = "Encryption is available only for the following backup formats: \"7z\", \"RAR\", \"zip\" (not secure). If any other format is used then encryption can't be applied and encryption settings are ignored. You can safely change the password at anytime: the \"Restore\" button will still work for old backups encrypted with a previous password. You don't need to type a password to restore backups using the \"Restore\" button. Password is required when you extract the archives manually. Please, don't forget your password, because it's impossible to restore it.";
+$wb["backup_encryption_options_txt"] = 'Encryption options';
+$wb["backup_enable_encryption_txt"] = 'Enable encryption';
+$wb["backup_password_txt"] = 'Password';
+$wb["backup_format_default_txt"] = 'Default: zip (deflate) or tar (gzip)';
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_rar_txt"] = 'RAR';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
 ?>
diff --git a/interface/web/sites/lib/lang/it_web_backup_list.lng b/interface/web/sites/lib/lang/it_web_backup_list.lng
index 9aa7b0c175..d81039ea1a 100644
--- a/interface/web/sites/lib/lang/it_web_backup_list.lng
+++ b/interface/web/sites/lib/lang/it_web_backup_list.lng
@@ -18,4 +18,36 @@ $wb['delete_info_txt'] = 'Delete of the backup has been started. This action tak
 $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_pending_txt'] = 'There is already a pending backup job.';
+$wb['error_txt'] = 'Error';
+$wb['backup_info_txt'] = 'A backup process started. This action can take several minutes to complete.';
+$wb["backup_format_txt"] = 'Backup format';
+$wb["backup_format_unknown_txt"] = 'Unknown';
+$wb["backup_job_txt"] = 'Scheduler';
+$wb["backup_job_manual_txt"] = 'Manual';
+$wb["backup_job_auto_txt"] = 'Auto';
+$wb["manual_backup_title_txt"] = 'Manual backup';
+$wb["make_backup_web_txt"] = 'Make backup of web files';
+$wb["make_backup_database_txt"] = 'Make backup of databases';
+$wb["make_backup_confirm_txt"] = 'You are about to start a manual backup process. Manual backups count towards the total number of allowed backup copies: therefore if the limit will be exceeded, then oldest backups may be deleted automatically. Proceed?';
+$wb["yes_txt"] = 'Yes';
+$wb["no_txt"] = 'No';
+$wb["backup_is_encrypted_txt"] = "Encrypted";
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
+$wb["backup_format_rar_txt"] = 'RAR';
 ?>
diff --git a/interface/web/sites/lib/lang/it_web_vhost_domain.lng b/interface/web/sites/lib/lang/it_web_vhost_domain.lng
index 4613d2e14e..cc890d855e 100644
--- a/interface/web/sites/lib/lang/it_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/it_web_vhost_domain.lng
@@ -156,4 +156,31 @@ $wb['log_retention_txt'] = 'Logfiles retention time';
 $wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
 $wb['limit_web_quota_not_0_txt'] = 'Harddisk Quota cannot be set to 0.';
 $wb['proxy_protocol_txt'] = 'Enable PROXY Protocol';
+$wb["backup_format_web_txt"] = 'Backup format for web files';
+$wb["backup_format_db_txt"] = 'Backup format for database';
+$wb["backup_format_web_note_txt"] = 'In "default" mode ISPConfig has the following behaviour: if backup mode is set as web user, then "zip" format is used for web files, otherwise backup mode is set as root user and "tar (gzip)" format is used; database is compressed in "gzip" format. Only "tar" based formats and "rar" preserve file ownership and permissions of web files and guarantee correct restore.';
+$wb["backup_missing_utils_txt"] = 'Note: some utils are missing in the system that may prevent you from using some compression formats. Please, install the following utils to avoid possible backup problems: ';
+$wb["backup_compression_options_txt"] = 'Compression options';
+$wb["backup_encryption_note_txt"] = "Encryption is available only for the following backup formats: \"7z\", \"RAR\", \"zip\" (not secure). If any other format is used then encryption can't be applied and encryption settings are ignored. You can safely change the password at anytime: the \"Restore\" button will still work for old backups encrypted with a previous password. You don't need to type a password to restore backups using the \"Restore\" button. Password is required when you extract the archives manually. Please, don't forget your password, because it's impossible to restore it.";
+$wb["backup_encryption_options_txt"] = 'Encryption options';
+$wb["backup_enable_encryption_txt"] = 'Enable encryption';
+$wb["backup_password_txt"] = 'Password';
+$wb["backup_format_default_txt"] = 'Default: zip (deflate) or tar (gzip)';
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_rar_txt"] = 'RAR';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
 ?>
diff --git a/interface/web/sites/lib/lang/ja_web_backup_list.lng b/interface/web/sites/lib/lang/ja_web_backup_list.lng
index d1133334f0..056c7576ae 100644
--- a/interface/web/sites/lib/lang/ja_web_backup_list.lng
+++ b/interface/web/sites/lib/lang/ja_web_backup_list.lng
@@ -18,4 +18,36 @@ $wb['backup_type_mysql'] = 'MySQL Database';
 $wb['backup_type_web'] = 'Website files';
 $wb['filesize_txt'] = 'Filesize';
 $wb['backup_type_mongodb'] = 'MongoDB Database';
+$wb['backup_pending_txt'] = 'There is already a pending backup job.';
+$wb['error_txt'] = 'Error';
+$wb['backup_info_txt'] = 'A backup process started. This action can take several minutes to complete.';
+$wb["backup_format_txt"] = 'Backup format';
+$wb["backup_format_unknown_txt"] = 'Unknown';
+$wb["backup_job_txt"] = 'Scheduler';
+$wb["backup_job_manual_txt"] = 'Manual';
+$wb["backup_job_auto_txt"] = 'Auto';
+$wb["manual_backup_title_txt"] = 'Manual backup';
+$wb["make_backup_web_txt"] = 'Make backup of web files';
+$wb["make_backup_database_txt"] = 'Make backup of databases';
+$wb["make_backup_confirm_txt"] = 'You are about to start a manual backup process. Manual backups count towards the total number of allowed backup copies: therefore if the limit will be exceeded, then oldest backups may be deleted automatically. Proceed?';
+$wb["yes_txt"] = 'Yes';
+$wb["no_txt"] = 'No';
+$wb["backup_is_encrypted_txt"] = "Encrypted";
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
+$wb["backup_format_rar_txt"] = 'RAR';
 ?>
diff --git a/interface/web/sites/lib/lang/ja_web_vhost_domain.lng b/interface/web/sites/lib/lang/ja_web_vhost_domain.lng
index f4eabe51de..bfb5e8b137 100644
--- a/interface/web/sites/lib/lang/ja_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/ja_web_vhost_domain.lng
@@ -156,4 +156,31 @@ $wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min.
 $wb['domain_error_acme_invalid'] = 'Domain name acme.invalid not permitted.';
 $wb['limit_web_quota_not_0_txt'] = 'Harddisk Quota cannot be set to 0.';
 $wb['proxy_protocol_txt'] = 'Enable PROXY Protocol';
+$wb["backup_format_web_txt"] = 'Backup format for web files';
+$wb["backup_format_db_txt"] = 'Backup format for database';
+$wb["backup_format_web_note_txt"] = 'In "default" mode ISPConfig has the following behaviour: if backup mode is set as web user, then "zip" format is used for web files, otherwise backup mode is set as root user and "tar (gzip)" format is used; database is compressed in "gzip" format. Only "tar" based formats and "rar" preserve file ownership and permissions of web files and guarantee correct restore.';
+$wb["backup_missing_utils_txt"] = 'Note: some utils are missing in the system that may prevent you from using some compression formats. Please, install the following utils to avoid possible backup problems: ';
+$wb["backup_compression_options_txt"] = 'Compression options';
+$wb["backup_encryption_note_txt"] = "Encryption is available only for the following backup formats: \"7z\", \"RAR\", \"zip\" (not secure). If any other format is used then encryption can't be applied and encryption settings are ignored. You can safely change the password at anytime: the \"Restore\" button will still work for old backups encrypted with a previous password. You don't need to type a password to restore backups using the \"Restore\" button. Password is required when you extract the archives manually. Please, don't forget your password, because it's impossible to restore it.";
+$wb["backup_encryption_options_txt"] = 'Encryption options';
+$wb["backup_enable_encryption_txt"] = 'Enable encryption';
+$wb["backup_password_txt"] = 'Password';
+$wb["backup_format_default_txt"] = 'Default: zip (deflate) or tar (gzip)';
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_rar_txt"] = 'RAR';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
 ?>
diff --git a/interface/web/sites/lib/lang/nl_web_backup_list.lng b/interface/web/sites/lib/lang/nl_web_backup_list.lng
index d1133334f0..056c7576ae 100644
--- a/interface/web/sites/lib/lang/nl_web_backup_list.lng
+++ b/interface/web/sites/lib/lang/nl_web_backup_list.lng
@@ -18,4 +18,36 @@ $wb['backup_type_mysql'] = 'MySQL Database';
 $wb['backup_type_web'] = 'Website files';
 $wb['filesize_txt'] = 'Filesize';
 $wb['backup_type_mongodb'] = 'MongoDB Database';
+$wb['backup_pending_txt'] = 'There is already a pending backup job.';
+$wb['error_txt'] = 'Error';
+$wb['backup_info_txt'] = 'A backup process started. This action can take several minutes to complete.';
+$wb["backup_format_txt"] = 'Backup format';
+$wb["backup_format_unknown_txt"] = 'Unknown';
+$wb["backup_job_txt"] = 'Scheduler';
+$wb["backup_job_manual_txt"] = 'Manual';
+$wb["backup_job_auto_txt"] = 'Auto';
+$wb["manual_backup_title_txt"] = 'Manual backup';
+$wb["make_backup_web_txt"] = 'Make backup of web files';
+$wb["make_backup_database_txt"] = 'Make backup of databases';
+$wb["make_backup_confirm_txt"] = 'You are about to start a manual backup process. Manual backups count towards the total number of allowed backup copies: therefore if the limit will be exceeded, then oldest backups may be deleted automatically. Proceed?';
+$wb["yes_txt"] = 'Yes';
+$wb["no_txt"] = 'No';
+$wb["backup_is_encrypted_txt"] = "Encrypted";
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
+$wb["backup_format_rar_txt"] = 'RAR';
 ?>
diff --git a/interface/web/sites/lib/lang/nl_web_vhost_domain.lng b/interface/web/sites/lib/lang/nl_web_vhost_domain.lng
index fbd13b159d..d67cde421a 100644
--- a/interface/web/sites/lib/lang/nl_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/nl_web_vhost_domain.lng
@@ -156,4 +156,31 @@ $wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min.
 $wb['domain_error_acme_invalid'] = 'Domain name acme.invalid not permitted.';
 $wb['limit_web_quota_not_0_txt'] = 'Harddisk Quota cannot be set to 0.';
 $wb['proxy_protocol_txt'] = 'Enable PROXY Protocol';
+$wb["backup_format_web_txt"] = 'Backup format for web files';
+$wb["backup_format_db_txt"] = 'Backup format for database';
+$wb["backup_format_web_note_txt"] = 'In "default" mode ISPConfig has the following behaviour: if backup mode is set as web user, then "zip" format is used for web files, otherwise backup mode is set as root user and "tar (gzip)" format is used; database is compressed in "gzip" format. Only "tar" based formats and "rar" preserve file ownership and permissions of web files and guarantee correct restore.';
+$wb["backup_missing_utils_txt"] = 'Note: some utils are missing in the system that may prevent you from using some compression formats. Please, install the following utils to avoid possible backup problems: ';
+$wb["backup_compression_options_txt"] = 'Compression options';
+$wb["backup_encryption_note_txt"] = "Encryption is available only for the following backup formats: \"7z\", \"RAR\", \"zip\" (not secure). If any other format is used then encryption can't be applied and encryption settings are ignored. You can safely change the password at anytime: the \"Restore\" button will still work for old backups encrypted with a previous password. You don't need to type a password to restore backups using the \"Restore\" button. Password is required when you extract the archives manually. Please, don't forget your password, because it's impossible to restore it.";
+$wb["backup_encryption_options_txt"] = 'Encryption options';
+$wb["backup_enable_encryption_txt"] = 'Enable encryption';
+$wb["backup_password_txt"] = 'Password';
+$wb["backup_format_default_txt"] = 'Default: zip (deflate) or tar (gzip)';
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_rar_txt"] = 'RAR';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
 ?>
diff --git a/interface/web/sites/lib/lang/pl_web_backup_list.lng b/interface/web/sites/lib/lang/pl_web_backup_list.lng
index b9fdf3d632..a04c0bacd2 100644
--- a/interface/web/sites/lib/lang/pl_web_backup_list.lng
+++ b/interface/web/sites/lib/lang/pl_web_backup_list.lng
@@ -18,4 +18,36 @@ $wb['backup_type_mysql'] = 'Baza MySQL';
 $wb['backup_type_web'] = 'Pliki strony';
 $wb['filesize_txt'] = 'Filesize';
 $wb['backup_type_mongodb'] = 'MongoDB Database';
+$wb['backup_pending_txt'] = 'There is already a pending backup job.';
+$wb['error_txt'] = 'Error';
+$wb['backup_info_txt'] = 'A backup process started. This action can take several minutes to complete.';
+$wb["backup_format_txt"] = 'Backup format';
+$wb["backup_format_unknown_txt"] = 'Unknown';
+$wb["backup_job_txt"] = 'Scheduler';
+$wb["backup_job_manual_txt"] = 'Manual';
+$wb["backup_job_auto_txt"] = 'Auto';
+$wb["manual_backup_title_txt"] = 'Manual backup';
+$wb["make_backup_web_txt"] = 'Make backup of web files';
+$wb["make_backup_database_txt"] = 'Make backup of databases';
+$wb["make_backup_confirm_txt"] = 'You are about to start a manual backup process. Manual backups count towards the total number of allowed backup copies: therefore if the limit will be exceeded, then oldest backups may be deleted automatically. Proceed?';
+$wb["yes_txt"] = 'Yes';
+$wb["no_txt"] = 'No';
+$wb["backup_is_encrypted_txt"] = "Encrypted";
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
+$wb["backup_format_rar_txt"] = 'RAR';
 ?>
diff --git a/interface/web/sites/lib/lang/pl_web_vhost_domain.lng b/interface/web/sites/lib/lang/pl_web_vhost_domain.lng
index ce4cdaceaf..c24c319fe5 100644
--- a/interface/web/sites/lib/lang/pl_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/pl_web_vhost_domain.lng
@@ -156,4 +156,31 @@ $wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min.
 $wb['domain_error_acme_invalid'] = 'Domain name acme.invalid not permitted.';
 $wb['limit_web_quota_not_0_txt'] = 'Harddisk Quota cannot be set to 0.';
 $wb['proxy_protocol_txt'] = 'Enable PROXY Protocol';
+$wb["backup_format_web_txt"] = 'Backup format for web files';
+$wb["backup_format_db_txt"] = 'Backup format for database';
+$wb["backup_format_web_note_txt"] = 'In "default" mode ISPConfig has the following behaviour: if backup mode is set as web user, then "zip" format is used for web files, otherwise backup mode is set as root user and "tar (gzip)" format is used; database is compressed in "gzip" format. Only "tar" based formats and "rar" preserve file ownership and permissions of web files and guarantee correct restore.';
+$wb["backup_missing_utils_txt"] = 'Note: some utils are missing in the system that may prevent you from using some compression formats. Please, install the following utils to avoid possible backup problems: ';
+$wb["backup_compression_options_txt"] = 'Compression options';
+$wb["backup_encryption_note_txt"] = "Encryption is available only for the following backup formats: \"7z\", \"RAR\", \"zip\" (not secure). If any other format is used then encryption can't be applied and encryption settings are ignored. You can safely change the password at anytime: the \"Restore\" button will still work for old backups encrypted with a previous password. You don't need to type a password to restore backups using the \"Restore\" button. Password is required when you extract the archives manually. Please, don't forget your password, because it's impossible to restore it.";
+$wb["backup_encryption_options_txt"] = 'Encryption options';
+$wb["backup_enable_encryption_txt"] = 'Enable encryption';
+$wb["backup_password_txt"] = 'Password';
+$wb["backup_format_default_txt"] = 'Default: zip (deflate) or tar (gzip)';
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_rar_txt"] = 'RAR';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
 ?>
diff --git a/interface/web/sites/lib/lang/pt_web_backup_list.lng b/interface/web/sites/lib/lang/pt_web_backup_list.lng
index d1133334f0..056c7576ae 100644
--- a/interface/web/sites/lib/lang/pt_web_backup_list.lng
+++ b/interface/web/sites/lib/lang/pt_web_backup_list.lng
@@ -18,4 +18,36 @@ $wb['backup_type_mysql'] = 'MySQL Database';
 $wb['backup_type_web'] = 'Website files';
 $wb['filesize_txt'] = 'Filesize';
 $wb['backup_type_mongodb'] = 'MongoDB Database';
+$wb['backup_pending_txt'] = 'There is already a pending backup job.';
+$wb['error_txt'] = 'Error';
+$wb['backup_info_txt'] = 'A backup process started. This action can take several minutes to complete.';
+$wb["backup_format_txt"] = 'Backup format';
+$wb["backup_format_unknown_txt"] = 'Unknown';
+$wb["backup_job_txt"] = 'Scheduler';
+$wb["backup_job_manual_txt"] = 'Manual';
+$wb["backup_job_auto_txt"] = 'Auto';
+$wb["manual_backup_title_txt"] = 'Manual backup';
+$wb["make_backup_web_txt"] = 'Make backup of web files';
+$wb["make_backup_database_txt"] = 'Make backup of databases';
+$wb["make_backup_confirm_txt"] = 'You are about to start a manual backup process. Manual backups count towards the total number of allowed backup copies: therefore if the limit will be exceeded, then oldest backups may be deleted automatically. Proceed?';
+$wb["yes_txt"] = 'Yes';
+$wb["no_txt"] = 'No';
+$wb["backup_is_encrypted_txt"] = "Encrypted";
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
+$wb["backup_format_rar_txt"] = 'RAR';
 ?>
diff --git a/interface/web/sites/lib/lang/pt_web_vhost_domain.lng b/interface/web/sites/lib/lang/pt_web_vhost_domain.lng
index 8c1e76af38..dc6895c3e1 100644
--- a/interface/web/sites/lib/lang/pt_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/pt_web_vhost_domain.lng
@@ -156,4 +156,31 @@ $wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min.
 $wb['domain_error_acme_invalid'] = 'Domain name acme.invalid not permitted.';
 $wb['limit_web_quota_not_0_txt'] = 'Harddisk Quota cannot be set to 0.';
 $wb['proxy_protocol_txt'] = 'Enable PROXY Protocol';
+$wb["backup_format_web_txt"] = 'Backup format for web files';
+$wb["backup_format_db_txt"] = 'Backup format for database';
+$wb["backup_format_web_note_txt"] = 'In "default" mode ISPConfig has the following behaviour: if backup mode is set as web user, then "zip" format is used for web files, otherwise backup mode is set as root user and "tar (gzip)" format is used; database is compressed in "gzip" format. Only "tar" based formats and "rar" preserve file ownership and permissions of web files and guarantee correct restore.';
+$wb["backup_missing_utils_txt"] = 'Note: some utils are missing in the system that may prevent you from using some compression formats. Please, install the following utils to avoid possible backup problems: ';
+$wb["backup_compression_options_txt"] = 'Compression options';
+$wb["backup_encryption_note_txt"] = "Encryption is available only for the following backup formats: \"7z\", \"RAR\", \"zip\" (not secure). If any other format is used then encryption can't be applied and encryption settings are ignored. You can safely change the password at anytime: the \"Restore\" button will still work for old backups encrypted with a previous password. You don't need to type a password to restore backups using the \"Restore\" button. Password is required when you extract the archives manually. Please, don't forget your password, because it's impossible to restore it.";
+$wb["backup_encryption_options_txt"] = 'Encryption options';
+$wb["backup_enable_encryption_txt"] = 'Enable encryption';
+$wb["backup_password_txt"] = 'Password';
+$wb["backup_format_default_txt"] = 'Default: zip (deflate) or tar (gzip)';
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_rar_txt"] = 'RAR';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
 ?>
diff --git a/interface/web/sites/lib/lang/ro_web_backup_list.lng b/interface/web/sites/lib/lang/ro_web_backup_list.lng
index d1133334f0..056c7576ae 100644
--- a/interface/web/sites/lib/lang/ro_web_backup_list.lng
+++ b/interface/web/sites/lib/lang/ro_web_backup_list.lng
@@ -18,4 +18,36 @@ $wb['backup_type_mysql'] = 'MySQL Database';
 $wb['backup_type_web'] = 'Website files';
 $wb['filesize_txt'] = 'Filesize';
 $wb['backup_type_mongodb'] = 'MongoDB Database';
+$wb['backup_pending_txt'] = 'There is already a pending backup job.';
+$wb['error_txt'] = 'Error';
+$wb['backup_info_txt'] = 'A backup process started. This action can take several minutes to complete.';
+$wb["backup_format_txt"] = 'Backup format';
+$wb["backup_format_unknown_txt"] = 'Unknown';
+$wb["backup_job_txt"] = 'Scheduler';
+$wb["backup_job_manual_txt"] = 'Manual';
+$wb["backup_job_auto_txt"] = 'Auto';
+$wb["manual_backup_title_txt"] = 'Manual backup';
+$wb["make_backup_web_txt"] = 'Make backup of web files';
+$wb["make_backup_database_txt"] = 'Make backup of databases';
+$wb["make_backup_confirm_txt"] = 'You are about to start a manual backup process. Manual backups count towards the total number of allowed backup copies: therefore if the limit will be exceeded, then oldest backups may be deleted automatically. Proceed?';
+$wb["yes_txt"] = 'Yes';
+$wb["no_txt"] = 'No';
+$wb["backup_is_encrypted_txt"] = "Encrypted";
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
+$wb["backup_format_rar_txt"] = 'RAR';
 ?>
diff --git a/interface/web/sites/lib/lang/ro_web_vhost_domain.lng b/interface/web/sites/lib/lang/ro_web_vhost_domain.lng
index 00a9c247fc..8e27105a6a 100644
--- a/interface/web/sites/lib/lang/ro_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/ro_web_vhost_domain.lng
@@ -156,4 +156,31 @@ $wb['log_retention_txt'] = 'Logfiles retention time';
 $wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
 $wb['limit_web_quota_not_0_txt'] = 'Harddisk Quota cannot be set to 0.';
 $wb['proxy_protocol_txt'] = 'Enable PROXY Protocol';
+$wb["backup_format_web_txt"] = 'Backup format for web files';
+$wb["backup_format_db_txt"] = 'Backup format for database';
+$wb["backup_format_web_note_txt"] = 'In "default" mode ISPConfig has the following behaviour: if backup mode is set as web user, then "zip" format is used for web files, otherwise backup mode is set as root user and "tar (gzip)" format is used; database is compressed in "gzip" format. Only "tar" based formats and "rar" preserve file ownership and permissions of web files and guarantee correct restore.';
+$wb["backup_missing_utils_txt"] = 'Note: some utils are missing in the system that may prevent you from using some compression formats. Please, install the following utils to avoid possible backup problems: ';
+$wb["backup_compression_options_txt"] = 'Compression options';
+$wb["backup_encryption_note_txt"] = "Encryption is available only for the following backup formats: \"7z\", \"RAR\", \"zip\" (not secure). If any other format is used then encryption can't be applied and encryption settings are ignored. You can safely change the password at anytime: the \"Restore\" button will still work for old backups encrypted with a previous password. You don't need to type a password to restore backups using the \"Restore\" button. Password is required when you extract the archives manually. Please, don't forget your password, because it's impossible to restore it.";
+$wb["backup_encryption_options_txt"] = 'Encryption options';
+$wb["backup_enable_encryption_txt"] = 'Enable encryption';
+$wb["backup_password_txt"] = 'Password';
+$wb["backup_format_default_txt"] = 'Default: zip (deflate) or tar (gzip)';
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_rar_txt"] = 'RAR';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
 ?>
diff --git a/interface/web/sites/lib/lang/ru_web_backup_list.lng b/interface/web/sites/lib/lang/ru_web_backup_list.lng
index 8d5b7b757b..8943d94750 100644
--- a/interface/web/sites/lib/lang/ru_web_backup_list.lng
+++ b/interface/web/sites/lib/lang/ru_web_backup_list.lng
@@ -18,4 +18,36 @@ $wb['backup_type_mysql'] = 'База данных MySQL';
 $wb['backup_type_web'] = 'Файлы Web сайта';
 $wb['filesize_txt'] = 'Размер файла';
 $wb['backup_type_mongodb'] = 'База данных MongoDB';
+$wb['backup_pending_txt'] = 'There is already a pending backup job.';
+$wb['error_txt'] = 'Error';
+$wb['backup_info_txt'] = 'A backup process started. This action can take several minutes to complete.';
+$wb["backup_format_txt"] = 'Backup format';
+$wb["backup_format_unknown_txt"] = 'Unknown';
+$wb["backup_job_txt"] = 'Scheduler';
+$wb["backup_job_manual_txt"] = 'Manual';
+$wb["backup_job_auto_txt"] = 'Auto';
+$wb["manual_backup_title_txt"] = 'Manual backup';
+$wb["make_backup_web_txt"] = 'Make backup of web files';
+$wb["make_backup_database_txt"] = 'Make backup of databases';
+$wb["make_backup_confirm_txt"] = 'You are about to start a manual backup process. Manual backups count towards the total number of allowed backup copies: therefore if the limit will be exceeded, then oldest backups may be deleted automatically. Proceed?';
+$wb["yes_txt"] = 'Yes';
+$wb["no_txt"] = 'No';
+$wb["backup_is_encrypted_txt"] = "Encrypted";
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
+$wb["backup_format_rar_txt"] = 'RAR';
 ?>
diff --git a/interface/web/sites/lib/lang/ru_web_vhost_domain.lng b/interface/web/sites/lib/lang/ru_web_vhost_domain.lng
index 8e596defa3..c9a2a0a4ba 100644
--- a/interface/web/sites/lib/lang/ru_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/ru_web_vhost_domain.lng
@@ -156,4 +156,31 @@ $wb['log_retention_txt'] = 'Logfiles retention time';
 $wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
 $wb['limit_web_quota_not_0_txt'] = 'Harddisk Quota cannot be set to 0.';
 $wb['proxy_protocol_txt'] = 'Enable PROXY Protocol';
+$wb["backup_format_web_txt"] = 'Backup format for web files';
+$wb["backup_format_db_txt"] = 'Backup format for database';
+$wb["backup_format_web_note_txt"] = 'In "default" mode ISPConfig has the following behaviour: if backup mode is set as web user, then "zip" format is used for web files, otherwise backup mode is set as root user and "tar (gzip)" format is used; database is compressed in "gzip" format. Only "tar" based formats and "rar" preserve file ownership and permissions of web files and guarantee correct restore.';
+$wb["backup_missing_utils_txt"] = 'Note: some utils are missing in the system that may prevent you from using some compression formats. Please, install the following utils to avoid possible backup problems: ';
+$wb["backup_compression_options_txt"] = 'Compression options';
+$wb["backup_encryption_note_txt"] = "Encryption is available only for the following backup formats: \"7z\", \"RAR\", \"zip\" (not secure). If any other format is used then encryption can't be applied and encryption settings are ignored. You can safely change the password at anytime: the \"Restore\" button will still work for old backups encrypted with a previous password. You don't need to type a password to restore backups using the \"Restore\" button. Password is required when you extract the archives manually. Please, don't forget your password, because it's impossible to restore it.";
+$wb["backup_encryption_options_txt"] = 'Encryption options';
+$wb["backup_enable_encryption_txt"] = 'Enable encryption';
+$wb["backup_password_txt"] = 'Password';
+$wb["backup_format_default_txt"] = 'Default: zip (deflate) or tar (gzip)';
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_rar_txt"] = 'RAR';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
 ?>
diff --git a/interface/web/sites/lib/lang/se_web_backup_list.lng b/interface/web/sites/lib/lang/se_web_backup_list.lng
index 1f9073ab6d..702a46e8d2 100644
--- a/interface/web/sites/lib/lang/se_web_backup_list.lng
+++ b/interface/web/sites/lib/lang/se_web_backup_list.lng
@@ -18,4 +18,36 @@ $wb['backup_type_mysql'] = 'MySQL-databaser';
 $wb['backup_type_web'] = 'Webbsidefiler';
 $wb['filesize_txt'] = 'Filesize';
 $wb['backup_type_mongodb'] = 'MongoDB Database';
+$wb['backup_pending_txt'] = 'There is already a pending backup job.';
+$wb['error_txt'] = 'Error';
+$wb['backup_info_txt'] = 'A backup process started. This action can take several minutes to complete.';
+$wb["backup_format_txt"] = 'Backup format';
+$wb["backup_format_unknown_txt"] = 'Unknown';
+$wb["backup_job_txt"] = 'Scheduler';
+$wb["backup_job_manual_txt"] = 'Manual';
+$wb["backup_job_auto_txt"] = 'Auto';
+$wb["manual_backup_title_txt"] = 'Manual backup';
+$wb["make_backup_web_txt"] = 'Make backup of web files';
+$wb["make_backup_database_txt"] = 'Make backup of databases';
+$wb["make_backup_confirm_txt"] = 'You are about to start a manual backup process. Manual backups count towards the total number of allowed backup copies: therefore if the limit will be exceeded, then oldest backups may be deleted automatically. Proceed?';
+$wb["yes_txt"] = 'Yes';
+$wb["no_txt"] = 'No';
+$wb["backup_is_encrypted_txt"] = "Encrypted";
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
+$wb["backup_format_rar_txt"] = 'RAR';
 ?>
diff --git a/interface/web/sites/lib/lang/se_web_vhost_domain.lng b/interface/web/sites/lib/lang/se_web_vhost_domain.lng
index 01db60b572..ec509b333a 100644
--- a/interface/web/sites/lib/lang/se_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/se_web_vhost_domain.lng
@@ -156,4 +156,31 @@ $wb['log_retention_txt'] = 'Logfiles retention time';
 $wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
 $wb['limit_web_quota_not_0_txt'] = 'Harddisk Quota cannot be set to 0.';
 $wb['proxy_protocol_txt'] = 'Enable PROXY Protocol';
+$wb["backup_format_web_txt"] = 'Backup format for web files';
+$wb["backup_format_db_txt"] = 'Backup format for database';
+$wb["backup_format_web_note_txt"] = 'In "default" mode ISPConfig has the following behaviour: if backup mode is set as web user, then "zip" format is used for web files, otherwise backup mode is set as root user and "tar (gzip)" format is used; database is compressed in "gzip" format. Only "tar" based formats and "rar" preserve file ownership and permissions of web files and guarantee correct restore.';
+$wb["backup_missing_utils_txt"] = 'Note: some utils are missing in the system that may prevent you from using some compression formats. Please, install the following utils to avoid possible backup problems: ';
+$wb["backup_compression_options_txt"] = 'Compression options';
+$wb["backup_encryption_note_txt"] = "Encryption is available only for the following backup formats: \"7z\", \"RAR\", \"zip\" (not secure). If any other format is used then encryption can't be applied and encryption settings are ignored. You can safely change the password at anytime: the \"Restore\" button will still work for old backups encrypted with a previous password. You don't need to type a password to restore backups using the \"Restore\" button. Password is required when you extract the archives manually. Please, don't forget your password, because it's impossible to restore it.";
+$wb["backup_encryption_options_txt"] = 'Encryption options';
+$wb["backup_enable_encryption_txt"] = 'Enable encryption';
+$wb["backup_password_txt"] = 'Password';
+$wb["backup_format_default_txt"] = 'Default: zip (deflate) or tar (gzip)';
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_rar_txt"] = 'RAR';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
 ?>
diff --git a/interface/web/sites/lib/lang/sk_web_backup_list.lng b/interface/web/sites/lib/lang/sk_web_backup_list.lng
index d1133334f0..056c7576ae 100644
--- a/interface/web/sites/lib/lang/sk_web_backup_list.lng
+++ b/interface/web/sites/lib/lang/sk_web_backup_list.lng
@@ -18,4 +18,36 @@ $wb['backup_type_mysql'] = 'MySQL Database';
 $wb['backup_type_web'] = 'Website files';
 $wb['filesize_txt'] = 'Filesize';
 $wb['backup_type_mongodb'] = 'MongoDB Database';
+$wb['backup_pending_txt'] = 'There is already a pending backup job.';
+$wb['error_txt'] = 'Error';
+$wb['backup_info_txt'] = 'A backup process started. This action can take several minutes to complete.';
+$wb["backup_format_txt"] = 'Backup format';
+$wb["backup_format_unknown_txt"] = 'Unknown';
+$wb["backup_job_txt"] = 'Scheduler';
+$wb["backup_job_manual_txt"] = 'Manual';
+$wb["backup_job_auto_txt"] = 'Auto';
+$wb["manual_backup_title_txt"] = 'Manual backup';
+$wb["make_backup_web_txt"] = 'Make backup of web files';
+$wb["make_backup_database_txt"] = 'Make backup of databases';
+$wb["make_backup_confirm_txt"] = 'You are about to start a manual backup process. Manual backups count towards the total number of allowed backup copies: therefore if the limit will be exceeded, then oldest backups may be deleted automatically. Proceed?';
+$wb["yes_txt"] = 'Yes';
+$wb["no_txt"] = 'No';
+$wb["backup_is_encrypted_txt"] = "Encrypted";
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
+$wb["backup_format_rar_txt"] = 'RAR';
 ?>
diff --git a/interface/web/sites/lib/lang/sk_web_vhost_domain.lng b/interface/web/sites/lib/lang/sk_web_vhost_domain.lng
index 7d52d3edf1..0509b1a3bb 100644
--- a/interface/web/sites/lib/lang/sk_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/sk_web_vhost_domain.lng
@@ -156,4 +156,31 @@ $wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min.
 $wb['domain_error_acme_invalid'] = 'Domain name acme.invalid not permitted.';
 $wb['limit_web_quota_not_0_txt'] = 'Harddisk Quota cannot be set to 0.';
 $wb['proxy_protocol_txt'] = 'Enable PROXY Protocol';
+$wb["backup_format_web_txt"] = 'Backup format for web files';
+$wb["backup_format_db_txt"] = 'Backup format for database';
+$wb["backup_format_web_note_txt"] = 'In "default" mode ISPConfig has the following behaviour: if backup mode is set as web user, then "zip" format is used for web files, otherwise backup mode is set as root user and "tar (gzip)" format is used; database is compressed in "gzip" format. Only "tar" based formats and "rar" preserve file ownership and permissions of web files and guarantee correct restore.';
+$wb["backup_missing_utils_txt"] = 'Note: some utils are missing in the system that may prevent you from using some compression formats. Please, install the following utils to avoid possible backup problems: ';
+$wb["backup_compression_options_txt"] = 'Compression options';
+$wb["backup_encryption_note_txt"] = "Encryption is available only for the following backup formats: \"7z\", \"RAR\", \"zip\" (not secure). If any other format is used then encryption can't be applied and encryption settings are ignored. You can safely change the password at anytime: the \"Restore\" button will still work for old backups encrypted with a previous password. You don't need to type a password to restore backups using the \"Restore\" button. Password is required when you extract the archives manually. Please, don't forget your password, because it's impossible to restore it.";
+$wb["backup_encryption_options_txt"] = 'Encryption options';
+$wb["backup_enable_encryption_txt"] = 'Enable encryption';
+$wb["backup_password_txt"] = 'Password';
+$wb["backup_format_default_txt"] = 'Default: zip (deflate) or tar (gzip)';
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_rar_txt"] = 'RAR';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
 ?>
diff --git a/interface/web/sites/lib/lang/tr_web_backup_list.lng b/interface/web/sites/lib/lang/tr_web_backup_list.lng
index 31aea494ca..e304290f61 100644
--- a/interface/web/sites/lib/lang/tr_web_backup_list.lng
+++ b/interface/web/sites/lib/lang/tr_web_backup_list.lng
@@ -18,5 +18,36 @@ $wb['delete_pending_txt'] = 'Bekleyen bir yedek silme iÅŸlemi var.';
 $wb['backup_type_mongodb'] = 'MongoDB Veritabanı';
 $wb['backup_type_mysql'] = 'MySQL Veritabanı';
 $wb['backup_type_web'] = 'Web sitesi dosyaları';
-
+$wb['backup_pending_txt'] = 'There is already a pending backup job.';
+$wb['error_txt'] = 'Error';
+$wb['backup_info_txt'] = 'A backup process started. This action can take several minutes to complete.';
+$wb["backup_format_txt"] = 'Backup format';
+$wb["backup_format_unknown_txt"] = 'Unknown';
+$wb["backup_job_txt"] = 'Scheduler';
+$wb["backup_job_manual_txt"] = 'Manual';
+$wb["backup_job_auto_txt"] = 'Auto';
+$wb["manual_backup_title_txt"] = 'Manual backup';
+$wb["make_backup_web_txt"] = 'Make backup of web files';
+$wb["make_backup_database_txt"] = 'Make backup of databases';
+$wb["make_backup_confirm_txt"] = 'You are about to start a manual backup process. Manual backups count towards the total number of allowed backup copies: therefore if the limit will be exceeded, then oldest backups may be deleted automatically. Proceed?';
+$wb["yes_txt"] = 'Yes';
+$wb["no_txt"] = 'No';
+$wb["backup_is_encrypted_txt"] = "Encrypted";
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
+$wb["backup_format_rar_txt"] = 'RAR';
 ?>
diff --git a/interface/web/sites/lib/lang/tr_web_vhost_domain.lng b/interface/web/sites/lib/lang/tr_web_vhost_domain.lng
index a190375c37..071df396e4 100644
--- a/interface/web/sites/lib/lang/tr_web_vhost_domain.lng
+++ b/interface/web/sites/lib/lang/tr_web_vhost_domain.lng
@@ -158,4 +158,31 @@ $wb['https_port_error_regex'] = 'HTTPS kapı numarası geçersiz.';
 $wb['enable_pagespeed_txt'] = 'PageSpeed Kullanılsın';
 $wb['log_retention_txt'] = 'Günlük Dosyalarının Silinme Sıklığı';
 $wb['log_retention_error_regex'] = 'Gün cinsinden günlük dosyalarının silinme sıklığı (En küçük: 0 - En büyük: 9999)';
+$wb["backup_format_web_txt"] = 'Backup format for web files';
+$wb["backup_format_db_txt"] = 'Backup format for database';
+$wb["backup_format_web_note_txt"] = 'In "default" mode ISPConfig has the following behaviour: if backup mode is set as web user, then "zip" format is used for web files, otherwise backup mode is set as root user and "tar (gzip)" format is used; database is compressed in "gzip" format. Only "tar" based formats and "rar" preserve file ownership and permissions of web files and guarantee correct restore.';
+$wb["backup_missing_utils_txt"] = 'Note: some utils are missing in the system that may prevent you from using some compression formats. Please, install the following utils to avoid possible backup problems: ';
+$wb["backup_compression_options_txt"] = 'Compression options';
+$wb["backup_encryption_note_txt"] = "Encryption is available only for the following backup formats: \"7z\", \"RAR\", \"zip\" (not secure). If any other format is used then encryption can't be applied and encryption settings are ignored. You can safely change the password at anytime: the \"Restore\" button will still work for old backups encrypted with a previous password. You don't need to type a password to restore backups using the \"Restore\" button. Password is required when you extract the archives manually. Please, don't forget your password, because it's impossible to restore it.";
+$wb["backup_encryption_options_txt"] = 'Encryption options';
+$wb["backup_enable_encryption_txt"] = 'Enable encryption';
+$wb["backup_password_txt"] = 'Password';
+$wb["backup_format_default_txt"] = 'Default: zip (deflate) or tar (gzip)';
+$wb["backup_format_zip_txt"] = 'zip (deflate)';
+$wb["backup_format_gzip_txt"] = 'gzip';
+$wb["backup_format_bzip2_txt"] = 'bzip2';
+$wb["backup_format_xz_txt"] = 'xz';
+$wb["backup_format_zip_bzip2_txt"] = 'zip (bzip2)';
+$wb["backup_format_7z_lzma_txt"] = '7z (LZMA)';
+$wb["backup_format_7z_lzma2_txt"] = '7z (LZMA2)';
+$wb["backup_format_7z_ppmd_txt"] = '7z (PPMd)';
+$wb["backup_format_7z_bzip2_txt"] = '7z (BZip2)';
+$wb["backup_format_tar_gzip_txt"] = 'tar (gzip)';
+$wb["backup_format_tar_bzip2_txt"] = 'tar (bzip2)';
+$wb["backup_format_tar_xz_txt"] = 'tar (xz)';
+$wb["backup_format_rar_txt"] = 'RAR';
+$wb["backup_format_tar_7z_lzma_txt"] = 'tar + 7z (LZMA)';
+$wb["backup_format_tar_7z_lzma2_txt"] = 'tar + 7z (LZMA2)';
+$wb["backup_format_tar_7z_ppmd_txt"] = 'tar + 7z (PPMd)';
+$wb["backup_format_tar_7z_bzip2_txt"] = 'tar + 7z (BZip2)';
 ?>
diff --git a/interface/web/sites/templates/web_backup_list.htm b/interface/web/sites/templates/web_backup_list.htm
index 31028a703c..95c51d0c15 100644
--- a/interface/web/sites/templates/web_backup_list.htm
+++ b/interface/web/sites/templates/web_backup_list.htm
@@ -1,12 +1,18 @@
+<h3><tmpl_var name="manual_backup_title_txt"></h3>
+<button class="btn btn-default formbutton-default" type="button" onclick="ISPConfig.confirm_action('sites/web_vhost_domain_edit.php?id={tmpl_var name='parent_id'}&next_tab=backup&make_backup=database&','{tmpl_var name='make_backup_confirm_txt'}');">{tmpl_var name="make_backup_database_txt"}</button>
+<button class="btn btn-default formbutton-default" type="button" onclick="ISPConfig.confirm_action('sites/web_vhost_domain_edit.php?id={tmpl_var name='parent_id'}&next_tab=backup&make_backup=web&','{tmpl_var name='make_backup_confirm_txt'}');">{tmpl_var name="make_backup_web_txt"}</button>
+
 <tmpl_if name="msg">
-    <div id="OKMsg"><p><tmpl_var name="msg"></p></div>
+    <div id="OKMsg" class="tab-content bg-success text-success text-center"><p><tmpl_var name="msg"></p></div>
 </tmpl_if>
 <tmpl_if name="error">
-    <div id="errorMsg"><h3><tmpl_var name="error_txt"></h3><ol><tmpl_var name="error"></ol></div>
+    <div id="errorMsg" class="tab-content bg-danger text-danger text-center">
+        <h4><tmpl_var name="error_txt"></h4>
+        <p><tmpl_var name="error"></p>
+    </div>
 </tmpl_if>
 <h3><tmpl_var name="list_head_txt"></h3>
 
-
         <p class="fieldset-legend"><tmpl_var name="list_head_txt"></p>
             <div class="table-wrapper marginTop15">
 <table class="table table-auto table-striped" style="padding: 5px;">
@@ -14,6 +20,9 @@
                     <tr>
                         <th data-column="date"><tmpl_var name="date_txt"></th>
                         <th data-column="backup_type"><tmpl_var name="backup_type_txt"></th>
+                        <th data-column="backup_format"><tmpl_var name="backup_format_txt"></th>
+                        <th data-column="backup_job"><tmpl_var name="backup_job_txt"></th>
+                        <th data-column="backup_encrypted"><tmpl_var name="backup_is_encrypted_txt"></th>
                         <th data-column="filename"><tmpl_var name="filename_txt"></th>
                         <th data-column="filesize"><tmpl_var name="filesize_txt"></th>
                         <th class="small-col text-right">{tmpl_var name='search_limit'}</th>
@@ -24,6 +33,9 @@
                         <tr>
                             <td>{tmpl_var name="date"}</td>
                             <td>{tmpl_var name="backup_type"}</td>
+                            <td>{tmpl_var name="backup_format"}</td>
+                            <td>{tmpl_var name="backup_job"}</td>
+                            <td>{tmpl_var name="backup_encrypted"}</td>
                             <td>{tmpl_var name="filename"}</td>
                             <td>{tmpl_var name="filesize"}</td>
                             <td class="text-center">
diff --git a/interface/web/sites/templates/web_vhost_domain_backup.htm b/interface/web/sites/templates/web_vhost_domain_backup.htm
index c31a579fc2..b28b830188 100644
--- a/interface/web/sites/templates/web_vhost_domain_backup.htm
+++ b/interface/web/sites/templates/web_vhost_domain_backup.htm
@@ -29,7 +29,53 @@
                 <label for="backup_excludes" class="col-sm-3 control-label">{tmpl_var name='backup_excludes_txt'}</label>
                 <div class="col-sm-6"><input type="text" name="backup_excludes" id="backup_excludes" value="{tmpl_var name='backup_excludes'}" class="form-control" /></div><div class="col-sm-3 input-sm">&nbsp;{tmpl_var name='backup_excludes_note_txt'}
             </div></div>
-        
+
+            <legend>{tmpl_var name='backup_compression_options_txt'}</legend>
+            <div class="tab-content">
+                {tmpl_var name='backup_format_web_note_txt'}
+            </div>
+            <tmpl_if name="missing_utils">
+                <div class="tab-content bg-warning text-warning">
+                    {tmpl_var name='backup_missing_utils_txt'} {tmpl_var name='missing_utils'}
+                </div>
+            </tmpl_if>
+            <div class="form-group">
+                <label for="backup_format_web" class="col-sm-3 control-label">{tmpl_var name='backup_format_web_txt'}</label>
+                <div class="col-sm-9">
+                    <select name="backup_format_web" id="backup_format_web" class="form-control">
+                        {tmpl_var name='backup_format_web'}
+                    </select>
+                </div>
+            </div>
+            <div class="form-group">
+                <label for="backup_format_db" class="col-sm-3 control-label">{tmpl_var name='backup_format_db_txt'}</label>
+                <div class="col-sm-9">
+                    <select name="backup_format_db" id="backup_format_db" class="form-control">
+                        {tmpl_var name='backup_format_db'}
+                    </select>
+                </div>
+            </div>
+
+            <legend>{tmpl_var name='backup_encryption_options_txt'}</legend>
+            <div class="tab-content">
+                {tmpl_var name='backup_encryption_note_txt'}
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">
+                    {tmpl_var name='backup_enable_encryption_txt'}
+                </label>
+                <div class="col-sm-9">
+                    {tmpl_var name="backup_encrypt"}
+                </div>
+            </div>
+            <div class="form-group">
+                <label for="backup_password" class="col-sm-3 control-label">
+                    {tmpl_var name='backup_password_txt'}
+                </label>
+                <div class="col-sm-9">
+                    <input type="text" name="backup_password" id="backup_password" value="{tmpl_var name='backup_password'}" class="form-control" />
+                </div>
+            </div>
 
         {tmpl_var name='backup_records'}
 
diff --git a/remoting_client/API-docs/sites_database_add.html b/remoting_client/API-docs/sites_database_add.html
index acf53e7bc0..143d034721 100644
--- a/remoting_client/API-docs/sites_database_add.html
+++ b/remoting_client/API-docs/sites_database_add.html
@@ -31,6 +31,8 @@
 <p class="margin"> remote_ips&nbsp;&nbsp;(<span class="paratype">text</span>)</p>
 <p class="margin"> backup_interval&nbsp;&nbsp;(<span class="paratype">varchar(255)</span>)</p>
 <p class="margin"> backup_copies&nbsp;&nbsp;(<span class="paratype">int(11)</span>)</p>
+<p class="margin"> backup_format_web&nbsp;&nbsp;(<span class="paratype">varchar(255)</span>)</p>
+<p class="margin"> backup_format_db&nbsp;&nbsp;(<span class="paratype">varchar(255)</span>)</p>
 <p class="margin"> active&nbsp;&nbsp;(<span class="paratype">enum('n','y')</span>)</p>
 <p class="headgrp">Output: </p> 
 <p class="margin"> Returns the ID of the newly added database.</p>
diff --git a/remoting_client/API-docs/sites_web_aliasdomain_add.html b/remoting_client/API-docs/sites_web_aliasdomain_add.html
index 12e313efcc..688b6cd139 100644
--- a/remoting_client/API-docs/sites_web_aliasdomain_add.html
+++ b/remoting_client/API-docs/sites_web_aliasdomain_add.html
@@ -59,6 +59,8 @@
 <p class="margin"> custom_php_ini&nbsp;&nbsp;(<span class="paratype">mediumtext</span>)</p>
 <p class="margin"> backup_interval&nbsp;&nbsp;(<span class="paratype">varchar(255)</span>)</p>
 <p class="margin"> backup_copies&nbsp;&nbsp;(<span class="paratype">int(11)</span>)</p>
+<p class="margin"> backup_format_web&nbsp;&nbsp;(<span class="paratype">varchar(255)</span>)</p>
+<p class="margin"> backup_format_db&nbsp;&nbsp;(<span class="paratype">varchar(255)</span>)</p>
 <p class="margin"> active&nbsp;&nbsp;(<span class="paratype">enum('n','y')</span>)</p>
 <p class="margin"> traffic_quota_lock&nbsp;&nbsp;(<span class="paratype">enum('n','y')</span>)</p>
 <p class="headgrp">Output: </p> 
diff --git a/remoting_client/API-docs/sites_web_aliasdomain_update.html b/remoting_client/API-docs/sites_web_aliasdomain_update.html
index 53daaa2b2b..52b118f58b 100644
--- a/remoting_client/API-docs/sites_web_aliasdomain_update.html
+++ b/remoting_client/API-docs/sites_web_aliasdomain_update.html
@@ -60,6 +60,8 @@
 <p class="margin"> custom_php_ini&nbsp;&nbsp;(<span class="paratype">mediumtext</span>)</p>
 <p class="margin"> backup_interval&nbsp;&nbsp;(<span class="paratype">varchar(255)</span>)</p>
 <p class="margin"> backup_copies&nbsp;&nbsp;(<span class="paratype">int(11)</span>)</p>
+<p class="margin"> backup_format_web&nbsp;&nbsp;(<span class="paratype">varchar(255)</span>)</p>
+<p class="margin"> backup_format_db&nbsp;&nbsp;(<span class="paratype">varchar(255)</span>)</p>
 <p class="margin"> active&nbsp;&nbsp;(<span class="paratype">enum('n','y')</span>)</p>
 <p class="margin"> traffic_quota_lock&nbsp;&nbsp;(<span class="paratype">enum('n','y')</span>)</p>
 <b>Output: </b> 
diff --git a/remoting_client/API-docs/sites_web_subdomain_add.html b/remoting_client/API-docs/sites_web_subdomain_add.html
index 3e884f4ec7..b2c5404a04 100644
--- a/remoting_client/API-docs/sites_web_subdomain_add.html
+++ b/remoting_client/API-docs/sites_web_subdomain_add.html
@@ -59,6 +59,8 @@
 <p class="margin"> custom_php_ini&nbsp;&nbsp;(<span class="paratype">mediumtext</span>)</p>
 <p class="margin"> backup_interval&nbsp;&nbsp;(<span class="paratype">varchar(255)</span>)</p>
 <p class="margin"> backup_copies&nbsp;&nbsp;(<span class="paratype">int(11)</span>)</p>
+<p class="margin"> backup_format_web&nbsp;&nbsp;(<span class="paratype">varchar(255)</span>)</p>
+<p class="margin"> backup_format_db&nbsp;&nbsp;(<span class="paratype">varchar(255)</span>)</p>
 <p class="margin"> active&nbsp;&nbsp;(<span class="paratype">enum('n','y')</span>)</p>
 <p class="margin"> traffic_quota_lock&nbsp;&nbsp;(<span class="paratype">enum('n','y')</span>)</p>
 <p class="headgrp">Output: </p> 
diff --git a/remoting_client/API-docs/sites_web_subdomain_update.html b/remoting_client/API-docs/sites_web_subdomain_update.html
index 4563912b59..a6b47245d6 100644
--- a/remoting_client/API-docs/sites_web_subdomain_update.html
+++ b/remoting_client/API-docs/sites_web_subdomain_update.html
@@ -59,6 +59,8 @@
 <p class="margin"> custom_php_ini&nbsp;&nbsp;(<span class="paratype">mediumtext</span>)</p>
 <p class="margin"> backup_interval&nbsp;&nbsp;(<span class="paratype">varchar(255)</span>)</p>
 <p class="margin"> backup_copies&nbsp;&nbsp;(<span class="paratype">int(11)</span>)</p>
+<p class="margin"> backup_format_web&nbsp;&nbsp;(<span class="paratype">varchar(255)</span>)</p>
+<p class="margin"> backup_format_db&nbsp;&nbsp;(<span class="paratype">varchar(255)</span>)</p>
 <p class="margin"> active&nbsp;&nbsp;(<span class="paratype">enum('n','y')</span>)</p>
 <p class="margin"> traffic_quota_lock&nbsp;&nbsp;(<span class="paratype">enum('n','y')</span>)</p>
 <b>Output: </b> 
diff --git a/remoting_client/examples/sites_database_add.php b/remoting_client/examples/sites_database_add.php
index c63ad551eb..9de1e6674b 100644
--- a/remoting_client/examples/sites_database_add.php
+++ b/remoting_client/examples/sites_database_add.php
@@ -28,6 +28,8 @@ try {
 		'remote_ips' => '',
 		'backup_interval' => 'none',
 		'backup_copies' => 1,
+		'backup_format_web' => 'default',
+		'backup_format_db' => 'gzip',
 		'active' => 'y'
 	);
 
diff --git a/remoting_client/examples/sites_web_aliasdomain_add.php b/remoting_client/examples/sites_web_aliasdomain_add.php
index c459e47b87..602b273dd1 100644
--- a/remoting_client/examples/sites_web_aliasdomain_add.php
+++ b/remoting_client/examples/sites_web_aliasdomain_add.php
@@ -57,6 +57,8 @@ try {
 		'custom_php_ini' => '',
 		'backup_interval' => '',
 		'backup_copies' => 1,
+		'backup_format_web' => 'default',
+		'backup_format_db' => 'gzip',
 		'active' => 'y',
 		'traffic_quota_lock' => 'n'
 	);
diff --git a/remoting_client/examples/sites_web_domain_add.php b/remoting_client/examples/sites_web_domain_add.php
index 1ddd21e136..0ee462ab7a 100644
--- a/remoting_client/examples/sites_web_domain_add.php
+++ b/remoting_client/examples/sites_web_domain_add.php
@@ -58,6 +58,8 @@ try {
 		'custom_php_ini' => '',
 		'backup_interval' => '',
 		'backup_copies' => 1,
+		'backup_format_web' => 'default',
+		'backup_format_db' => 'gzip',
 		'active' => 'y',
 		'traffic_quota_lock' => 'n',
 		'http_port' => '80',
diff --git a/remoting_client/examples/sites_web_subdomain_add.php b/remoting_client/examples/sites_web_subdomain_add.php
index ac319388f0..c5a92b4703 100644
--- a/remoting_client/examples/sites_web_subdomain_add.php
+++ b/remoting_client/examples/sites_web_subdomain_add.php
@@ -57,6 +57,8 @@ try {
 		'custom_php_ini' => '',
 		'backup_interval' => '',
 		'backup_copies' => 1,
+		'backup_format_web' => 'default',
+		'backup_format_db' => 'gzip',
 		'active' => 'y',
 		'traffic_quota_lock' => 'n'
 	);
diff --git a/server/backup-now.php b/server/backup-now.php
new file mode 100644
index 0000000000..aa73a84369
--- /dev/null
+++ b/server/backup-now.php
@@ -0,0 +1,108 @@
+<?php
+
+/*
+Copyright (c) 2007-2016, Till Brehm, projektfarm Gmbh
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice,
+      this list of conditions and the following disclaimer in the documentation
+      and/or other materials provided with the distribution.
+    * Neither the name of ISPConfig nor the names of its contributors
+      may be used to endorse or promote products derived from this software without
+      specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+define('SCRIPT_PATH', dirname($_SERVER["SCRIPT_FILENAME"]));
+require SCRIPT_PATH."/lib/config.inc.php";
+require SCRIPT_PATH."/lib/app.inc.php";
+
+set_time_limit(0);
+ini_set('error_reporting', E_ALL & ~E_NOTICE);
+
+/**
+ * Prints usage info
+ * @author Ramil Valitov <ramilvalitov@gmail.com>
+ */
+function printUsageInfo(){
+    echo <<<EOT
+Usage:
+	php backup-now.php --id=<4> [--type=<all>]
+Options:
+	--id		id of the website to backup.
+	--type		backup type: all, web or mysql. Default is all.
+
+EOT;
+}
+
+/**
+ * Makes a backup
+ * @param int $domain_id id of the domain
+ * @param string $type type: mysql, web or all
+ * @return bool true if success
+ * @uses backup::run_backup() to make backups
+ * @author Ramil Valitov <ramilvalitov@gmail.com>
+ */
+function makeBackup($domain_id, $type)
+{
+    global $app;
+
+    echo "Making backup of website id=" . $domain_id . ", type=" . $type . ", please wait...\n";
+
+    // Load required class
+    $app->load('backup');
+
+    switch ($type) {
+        case "all":
+            $success = backup::run_backup($domain_id, "web", "manual");
+            $success = $success && backup::run_backup($domain_id, "mysql", "manual");
+            break;
+        case "mysql":
+            $success = backup::run_backup($domain_id, "mysql", "manual");
+            break;
+        case "web":
+            $success = backup::run_backup($domain_id, "web", "manual");
+            break;
+        default:
+            echo "Unknown format=" . $type . "\n";
+            printUsageInfo();
+            $success = false;
+    }
+    return $success;
+}
+
+//** Get commandline options
+$cmd_opt = getopt('', array('id::', 'type::'));
+$id = filter_var($cmd_opt['id'], FILTER_VALIDATE_INT);;
+if (!isset($cmd_opt['id']) || !is_int($id)) {
+    printUsageInfo();
+    exit(1);
+}
+
+if (isset($cmd_opt['type']) && !empty($cmd_opt['type'])) {
+    $type = $cmd_opt['type'];
+} else
+    $type = "all";
+
+$success = makeBackup($id, $type);
+
+echo "All operations finished, status " . ($success ? "success" : "failed") . ".\n";
+
+exit($success ? 0 : 2);
+
+?>
diff --git a/server/lib/app.inc.php b/server/lib/app.inc.php
index 146f2465c0..ec8b1668d1 100644
--- a/server/lib/app.inc.php
+++ b/server/lib/app.inc.php
@@ -36,6 +36,10 @@ class app {
 	var $loaded_modules = array();
 	var $loaded_plugins = array();
 	var $_calling_script = '';
+	/**
+	 * @var db
+	 */
+	public $db;
 
 	function __construct() {
 
diff --git a/server/lib/classes/backup.inc.php b/server/lib/classes/backup.inc.php
new file mode 100644
index 0000000000..ea959a2f9c
--- /dev/null
+++ b/server/lib/classes/backup.inc.php
@@ -0,0 +1,1452 @@
+<?php
+
+/*
+Copyright (c) 2007, Till Brehm, projektfarm Gmbh
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice,
+      this list of conditions and the following disclaimer in the documentation
+      and/or other materials provided with the distribution.
+    * Neither the name of ISPConfig nor the names of its contributors
+      may be used to endorse or promote products derived from this software without
+      specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/**
+ * Class backup
+ * All code that makes actual backup and restore of web files and database is here.
+ * @author Ramil Valitov <ramilvalitov@gmail.com>
+ * @see backup::run_backup() to run a single backup
+ * @see backup::run_all_backups() to run all backups
+ * @see backup::restoreBackupDatabase() to restore a database
+ * @see backup::restoreBackupWebFiles() to restore web files
+ */
+class backup
+{
+    /**
+     * Returns file extension for specified backup format
+     * @param string $format backup format
+     * @return string|null
+     * @author Ramil Valitov <ramilvalitov@gmail.com>
+     */
+    protected static function getBackupDbExtension($format)
+    {
+        $prefix = '.sql';
+        switch ($format) {
+            case 'gzip':
+                return $prefix . '.gz';
+            case 'bzip2':
+                return $prefix . '.bz2';
+            case 'xz':
+                return $prefix . '.xz';
+            case 'zip':
+            case 'zip_bzip2':
+                return '.zip';
+            case 'rar':
+                return '.rar';
+        }
+        if (strpos($format, "7z_") === 0) {
+            return $prefix . '.7z';
+        }
+        return null;
+    }
+
+    /**
+     * Returns file extension for specified backup format
+     * @param string $format backup format
+     * @return string|null
+     * @author Ramil Valitov <ramilvalitov@gmail.com>
+     */
+    protected static function getBackupWebExtension($format)
+    {
+        switch ($format) {
+            case 'tar_gzip':
+                return '.tar.gz';
+            case 'tar_bzip2':
+                return '.tar.bz2';
+            case 'tar_xz':
+                return '.tar.xz';
+            case 'zip':
+            case 'zip_bzip2':
+                return '.zip';
+            case 'rar':
+                return '.rar';
+        }
+        if (strpos($format, "tar_7z_") === 0) {
+            return '.tar.7z';
+        }
+        return null;
+    }
+
+    /**
+     * Sets file ownership to $web_user for all files and folders except log, ssl and web/stats
+     * @param string $web_document_root
+     * @param string $web_user
+     * @author Ramil Valitov <ramilvalitov@gmail.com>
+     */
+    protected static function restoreFileOwnership($web_document_root, $web_user)
+    {
+        global $app;
+
+        $app->log('Restoring permissions for ' . $web_document_root, LOGLEVEL_DEBUG);
+        $app->system->exec_safe('cd ? && find . -not -path "./web/stats/*" -and -not -path "./log" -and -not -path "./log/*" -and -not -path "./ssl" -and -not -path "./ssl/*" -and -not -path "." -exec chown ?:? {} \;', $web_document_root, $web_user, $web_user);
+    }
+
+    /**
+     * Returns default backup format used in previous versions of ISPConfig
+     * @param string $backup_mode
+     * @param string $backup_type
+     * @return string
+     * @author Ramil Valitov <ramilvalitov@gmail.com>
+     */
+    protected static function getDefaultBackupFormat($backup_mode, $backup_type)
+    {
+        //We have a backup from old version of ISPConfig
+        switch ($backup_type) {
+            case 'mysql':
+                return 'gzip';
+            case 'web':
+                return ($backup_mode == 'userzip') ? 'zip' : 'tar_gzip';
+        }
+        return "";
+    }
+
+    /**
+     * Restores a database backup.
+     * The backup directory must be mounted before calling this method.
+     * @param string $backup_format
+     * @param string $password password for encrypted backup or empty string if archive is not encrypted
+     * @param string $backup_dir
+     * @param string $filename
+     * @param string $backup_mode
+     * @param string $backup_type
+     * @return bool true if succeeded
+     * @see backup_plugin::mount_backup_dir()
+     * @author Ramil Valitov <ramilvalitov@gmail.com>
+     */
+    public static function restoreBackupDatabase($backup_format, $password, $backup_dir, $filename, $backup_mode, $backup_type)
+    {
+        global $app;
+
+        //* Load sql dump into db
+        include 'lib/mysql_clientdb.conf';
+
+        if (empty($backup_format)) {
+            $backup_format = self::getDefaultBackupFormat($backup_mode, $backup_type);
+        }
+        $extension = self::getBackupDbExtension($backup_format);
+        if (!empty($extension)) {
+            //Replace dots for preg_match search
+            $extension = str_replace('.', '\.', $extension);
+        }
+        $success = false;
+        $full_filename = $backup_dir . '/' . $filename;
+
+        $app->log('Restoring MySQL backup ' . $full_filename . ', backup format "' . $backup_format . '", backup mode "' . $backup_mode . '"', LOGLEVEL_DEBUG);
+
+        if (file_exists($full_filename) && !empty($extension)) {
+            preg_match('@^(manual-)?db_(?P<db>.+)_\d{4}-\d{2}-\d{2}_\d{2}-\d{2}' . $extension . '$@', $filename, $matches);
+            if (!isset($matches['db']) || empty($matches['db'])) {
+                $app->log('Failed to detect database name during restore of ' . $full_filename, LOGLEVEL_ERROR);
+                return false;
+            }
+            $db_name = $matches['db'];
+            switch ($backup_format) {
+                case "gzip":
+                    $command = "gunzip --stdout ? | mysql -h ? -u ? -p? ?";
+                    break;
+                case "zip":
+                case "zip_bzip2":
+                    $command = "unzip -qq -p -P " . escapeshellarg($password) . " ? | mysql -h ? -u ? -p? ?";
+                    break;
+                case "bzip2":
+                    $command = "bunzip2 -q -c ? | mysql -h ? -u ? -p? ?";
+                    break;
+                case "xz":
+                    $command = "unxz -q -q -c ? | mysql -h ? -u ? -p? ?";
+                    break;
+                case "rar":
+                    //First, test that the archive is correct and we have a correct password
+                    $options = self::getUnrarOptions($password);
+                    $app->system->exec_safe("rar t " . $options . " ?", $full_filename);
+                    if ($app->system->last_exec_retcode() == 0) {
+                        $app->log('Archive test passed for ' . $full_filename, LOGLEVEL_DEBUG);
+                        $command = "rar x " . $options. " ? | mysql -h ? -u ? -p? ?";
+                    }
+                    break;
+            }
+            if (strpos($backup_format, "7z_") === 0) {
+                $options = self::get7zDecompressOptions($password);
+                //First, test that the archive is correct and we have a correct password
+                $app->system->exec_safe("7z t " . $options . " ?", $full_filename);
+                if ($app->system->last_exec_retcode() == 0) {
+                    $app->log('Archive test passed for ' . $full_filename, LOGLEVEL_DEBUG);
+                    $command = "7z x " . $options . " -so ? | mysql -h ? -u ? -p? ?";
+                } else
+                    $command = null;
+            }
+            if (!empty($command)) {
+                /** @var string $clientdb_host */
+                /** @var string $clientdb_user */
+                /** @var string $clientdb_password */
+                $app->system->exec_safe($command, $full_filename, $clientdb_host, $clientdb_user, $clientdb_password, $db_name);
+                $retval = $app->system->last_exec_retcode();
+                if ($retval == 0) {
+                    $app->log('Restored MySQL backup ' . $full_filename, LOGLEVEL_DEBUG);
+                    $success = true;
+                } else {
+                    $app->log('Failed to restore web backup ' . $full_filename . ', exit code ' . $retval, LOGLEVEL_ERROR);
+                }
+            } else {
+                $app->log('Archive test failed for ' . $full_filename, LOGLEVEL_DEBUG);
+            }
+        } else {
+            $app->log('Failed to process MySQL backup ' . $full_filename, LOGLEVEL_ERROR);
+        }
+        unset($clientdb_host);
+        unset($clientdb_user);
+        unset($clientdb_password);
+
+        return $success;
+    }
+
+    /**
+     * Restores web files backup.
+     * The backup directory must be mounted before calling this method.
+     * @param string $backup_format
+     * @param string $password password for encrypted backup or empty string if archive is not encrypted
+     * @param string $backup_dir
+     * @param string $filename
+     * @param string $backup_mode
+     * @param string $backup_type
+     * @param string $web_root
+     * @param string $web_user
+     * @param string $web_group
+     * @return bool true if succeed
+     * @see backup_plugin::mount_backup_dir()
+     * @author Ramil Valitov <ramilvalitov@gmail.com>
+     */
+    public static function restoreBackupWebFiles($backup_format, $password, $backup_dir, $filename, $backup_mode, $backup_type, $web_root, $web_user, $web_group)
+    {
+        global $app;
+
+        if (empty($backup_format)) {
+            $backup_format = self::getDefaultBackupFormat($backup_mode, $backup_type);
+        }
+        $full_filename = $backup_dir . '/' . $filename;
+        $result = false;
+
+        $app->log('Restoring web backup ' . $full_filename . ', backup format "' . $backup_format . '", backup mode "' . $backup_mode . '"', LOGLEVEL_DEBUG);
+
+        if (!empty($backup_format)) {
+            $app->system->web_folder_protection($web_root, false);
+            if ($backup_mode == 'userzip' || $backup_mode == 'rootgz') {
+                $user_mode = $backup_mode == 'userzip';
+                $filename = $user_mode ? ($web_root . '/backup/' . $filename) : $full_filename;
+
+                if (file_exists($full_filename) && $web_root != '' && $web_root != '/' && !stristr($full_filename, '..') && !stristr($full_filename, 'etc')) {
+                    if ($user_mode) {
+                        if (file_exists($filename)) rename($filename, $filename . '.bak');
+                        copy($full_filename, $filename);
+                        chgrp($filename, $web_group);
+                    }
+                    $user_prefix_cmd = $user_mode ? 'sudo -u ' . escapeshellarg($web_user) : '';
+                    $success = false;
+                    $retval = 0;
+                    switch ($backup_format) {
+                        case "tar_gzip":
+                        case "tar_bzip2":
+                        case "tar_xz":
+                            $command = $user_prefix_cmd . ' tar xf ? --directory ?';
+                            $app->system->exec_safe($command, $filename, $web_root);
+                            $retval = $app->system->last_exec_retcode();
+                            $success = ($retval == 0 || $retval == 2);
+                            break;
+                        case "zip":
+                        case "zip_bzip2":
+                            $command = $user_prefix_cmd . ' unzip -qq -P ' . escapeshellarg($password) . ' -o ? -d ? 2> /dev/null';
+                            $app->system->exec_safe($command, $filename, $web_root);
+                            $retval = $app->system->last_exec_retcode();
+                            /*
+                             * Exit code 50 can happen when zip fails to overwrite files that do not
+                             * belong to selected user, so we can consider this situation as success
+                             * with warnings.
+                             */
+                            $success = ($retval == 0 || $retval == 50);
+                            if ($success) {
+                                self::restoreFileOwnership($web_root, $web_user);
+                            }
+                            break;
+                        case 'rar':
+                            $options = self::getUnRarOptions($password);
+                            //First, test that the archive is correct and we have a correct password
+                            $command = $user_prefix_cmd . " rar t " . $options . " ? ?";
+                            //Rar requires trailing slash
+                            $app->system->exec_safe($command, $filename, $web_root . '/');
+                            $success = ($app->system->last_exec_retcode() == 0);
+                            if ($success) {
+                                //All good, now we can extract
+                                $app->log('Archive test passed for ' . $full_filename, LOGLEVEL_DEBUG);
+                                $command = $user_prefix_cmd . " rar x " . $options . " ? ?";
+                                //Rar requires trailing slash
+                                $app->system->exec_safe($command, $filename, $web_root . '/');
+                                $retval = $app->system->last_exec_retcode();
+                                //Exit code 9 can happen when we have file permission errors, in this case some
+                                //files will be skipped during extraction.
+                                $success = ($retval == 0 || $retval == 1 || $retval == 9);
+                            } else {
+                                $app->log('Archive test failed for ' . $full_filename, LOGLEVEL_DEBUG);
+                            }
+                            break;
+                    }
+                    if (strpos($backup_format, "tar_7z_") === 0) {
+                        $options = self::get7zDecompressOptions($password);
+                        //First, test that the archive is correct and we have a correct password
+                        $command = $user_prefix_cmd . " 7z t " . $options . " ?";
+                        $app->system->exec_safe($command, $filename);
+                        $success = ($app->system->last_exec_retcode() == 0);
+                        if ($success) {
+                            //All good, now we can extract
+                            $app->log('Archive test passed for ' . $full_filename, LOGLEVEL_DEBUG);
+                            $command = $user_prefix_cmd . " 7z x " . $options . " -so ? | tar xf - --directory ?";
+                            $app->system->exec_safe($command, $filename, $web_root);
+                            $retval = $app->system->last_exec_retcode();
+                            $success = ($retval == 0 || $retval == 2);
+                        } else {
+                            $app->log('Archive test failed for ' . $full_filename, LOGLEVEL_DEBUG);
+                        }
+                    }
+                    if ($user_mode) {
+                        unlink($filename);
+                        if (file_exists($filename . '.bak')) rename($filename . '.bak', $filename);
+                    }
+                    if ($success) {
+                        $app->log('Restored web backup ' . $full_filename, LOGLEVEL_DEBUG);
+                        $result = true;
+                    } else {
+                        $app->log('Failed to restore web backup ' . $full_filename . ', exit code ' . $retval, LOGLEVEL_ERROR);
+                    }
+                }
+            } else {
+                $app->log('Failed to restore web backup ' . $full_filename . ', backup mode "' . $backup_mode . '" not recognized.', LOGLEVEL_DEBUG);
+            }
+            $app->system->web_folder_protection($web_root, true);
+        } else {
+            $app->log('Failed to restore web backup ' . $full_filename . ', backup format not recognized.', LOGLEVEL_DEBUG);
+        }
+        return $result;
+    }
+
+    /**
+     * Returns a compression method, for example returns bzip2 for tar_7z_bzip2
+     * @param string $format
+     * @return false|string
+     * @author Ramil Valitov <ramilvalitov@gmail.com>
+     */
+    protected static function getCompressionMethod($format)
+    {
+        $pos = strrpos($format, "_");
+        return substr($format, $pos + 1);
+    }
+
+    /**
+     * Returns default options for compressing rar
+     * @param string $backup_tmp temporary directory that rar can use
+     * @param string|null $password backup password if any
+     * @return string options for rar
+     */
+    protected static function getRarOptions($backup_tmp, $password)
+    {
+        /**
+         * All rar options are listed here:
+         * https://documentation.help/WinRAR/HELPCommands.htm
+         * https://documentation.help/WinRAR/HELPSwitches.htm
+         * Some compression profiles and different versions of rar may use different default values, so it's better
+         * to specify everything explicitly.
+         * The difference between compression methods is not big in terms of file size, but is huge in terms of
+         * CPU and RAM consumption. Therefore it makes sense only to use fastest the compression method.
+         */
+        $options = array(
+            /**
+             * Start with fastest compression method (least compressive)
+             */
+            '-m1',
+
+            /**
+             * Disable solid archiving.
+             * Never use solid archive: it's very slow and requires to read and sort all files first
+             */
+            '-S-',
+
+            /**
+             * Ignore default profile and environment variables
+             * https://documentation.help/WinRAR/HELPSwCFGm.htm
+             */
+            '-CFG-',
+
+            /**
+             *  Disable error messages output
+             * https://documentation.help/WinRAR/HELPSwINUL.htm
+             */
+            '-inul',
+
+            /**
+             * Lock archive: this switch prevents any further archive modifications by rar
+             * https://documentation.help/WinRAR/HELPSwK.htm
+             */
+            '-k',
+
+            /**
+             * Create archive in RAR 5.0 format
+             * https://documentation.help/WinRAR/HELPSwMA.htm
+             */
+            '-ma',
+
+            /**
+             * Set dictionary size to 16Mb.
+             * When archiving, rar needs about 6x memory of specified dictionary size.
+             * https://documentation.help/WinRAR/HELPSwMD.htm
+             */
+            '-md16m',
+
+            /**
+             * Use only one CPU thread
+             * https://documentation.help/WinRAR/HELPSwMT.htm
+             */
+            '-mt1',
+
+            /**
+             * Use this switch when archiving to save file security information and when extracting to restore it.
+             * It stores file owner, group, file permissions and audit information.
+             * https://documentation.help/WinRAR/HELPSwOW.htm
+             */
+            '-ow',
+
+            /**
+             * Overwrite all
+             * https://documentation.help/WinRAR/HELPSwO.htm
+             */
+            '-o+',
+
+            /**
+             * Exclude base folder from names.
+             * Required for correct directory structure inside archive
+             * https://documentation.help/WinRAR/HELPSwEP1.htm
+             */
+            '-ep1',
+
+            /**
+             * Never add quick open information.
+             * This information is useful only if you want to read the contents of archive (list of files).
+             * Besides it can increase the archive size. As we need the archive only for future complete extraction,
+             * there's no need to use this information at all.
+             * https://documentation.help/WinRAR/HELPSwQO.htm
+             */
+            '-qo-',
+
+            /**
+             * Set lowest task priority (1) and 10ms sleep time between read/write operations.
+             * https://documentation.help/WinRAR/HELPSwRI.htm
+             */
+            '-ri1:10',
+
+            /**
+             * Temporary folder
+             * https://documentation.help/WinRAR/HELPSwW.htm
+             */
+            '-w' . escapeshellarg($backup_tmp),
+
+            /**
+             * Assume Yes on all queries
+             * https://documentation.help/WinRAR/HELPSwY.htm
+             */
+            '-y',
+        );
+
+        $options = implode(" ", $options);
+
+        if (!empty($password)) {
+            /**
+             * Encrypt both file data and headers
+             * https://documentation.help/WinRAR/HELPSwHP.htm
+             */
+            $options .= ' -HP' . escapeshellarg($password);
+        }
+        return $options;
+    }
+
+    /**
+     * Returns default options for decompressing rar
+     * @param string|null $password backup password if any
+     * @return string options for rar
+     */
+    protected static function getUnRarOptions($password)
+    {
+        /**
+         * All rar options are listed here:
+         * https://documentation.help/WinRAR/HELPCommands.htm
+         * https://documentation.help/WinRAR/HELPSwitches.htm
+         * Some compression profiles and different versions of rar may use different default values, so it's better
+         * to specify everything explicitly.
+         * The difference between compression methods is not big in terms of file size, but is huge in terms of
+         * CPU and RAM consumption. Therefore it makes sense only to use fastest the compression method.
+         */
+        $options = array(
+            /**
+             * Ignore default profile and environment variables
+             * https://documentation.help/WinRAR/HELPSwCFGm.htm
+             */
+            '-CFG-',
+
+            /**
+             *  Disable error messages output
+             * https://documentation.help/WinRAR/HELPSwINUL.htm
+             */
+            '-inul',
+
+            /**
+             * Use only one CPU thread
+             * https://documentation.help/WinRAR/HELPSwMT.htm
+             */
+            '-mt1',
+
+            /**
+             * Use this switch when archiving to save file security information and when extracting to restore it.
+             * It stores file owner, group, file permissions and audit information.
+             * https://documentation.help/WinRAR/HELPSwOW.htm
+             */
+            '-ow',
+
+            /**
+             * Overwrite all
+             * https://documentation.help/WinRAR/HELPSwO.htm
+             */
+            '-o+',
+
+            /**
+             * Set lowest task priority (1) and 10ms sleep time between read/write operations.
+             * https://documentation.help/WinRAR/HELPSwRI.htm
+             */
+            '-ri1:10',
+
+            /**
+             * Assume Yes on all queries
+             * https://documentation.help/WinRAR/HELPSwY.htm
+             */
+            '-y',
+        );
+
+        $options = implode(" ", $options);
+
+        if (!empty($password)) {
+            $options .= ' -P' . escapeshellarg($password);
+        }
+        return $options;
+    }
+
+    /**
+     * Returns compression options for 7z
+     * @param string $format compression format used in 7z
+     * @param string $password password if any
+     * @return string
+     */
+    protected static function get7zCompressOptions($format, $password)
+    {
+        $method = self::getCompressionMethod($format);
+        /**
+         * List of 7z options is here:
+         * https://linux.die.net/man/1/7z
+         * https://sevenzip.osdn.jp/chm/cmdline/syntax.htm
+         * https://sevenzip.osdn.jp/chm/cmdline/switches/
+         */
+        $options = array(
+            /**
+             * Use 7z format (container)
+             */
+            '-t7z',
+
+            /**
+             * Compression method (LZMA, LZMA2, etc.)
+             * https://sevenzip.osdn.jp/chm/cmdline/switches/method.htm
+             */
+            '-m0=' . $method,
+
+            /**
+             * Fastest compression method
+             */
+            '-mx=1',
+
+            /**
+             * Disable solid mode
+             */
+            '-ms=off',
+
+            /**
+             * Disable multithread mode, use less CPU
+             */
+            '-mmt=off',
+
+            /**
+             * Disable multithread mode for filters, use less CPU
+             */
+            '-mmtf=off',
+
+            /**
+             * Disable progress indicator
+             */
+            '-bd',
+
+            /**
+             * Assume yes on all queries
+             * https://sevenzip.osdn.jp/chm/cmdline/switches/yes.htm
+             */
+            '-y',
+        );
+        $options = implode(" ", $options);
+        switch (strtoupper($method)) {
+            case 'LZMA':
+            case 'LZMA2':
+                /**
+                 * Dictionary size is 5Mb.
+                 * 7z can use 12 times more RAM
+                 */
+                $options .= ' -md=5m';
+                break;
+            case 'PPMD':
+                /**
+                 * Dictionary size is 64Mb.
+                 * It's the maximum RAM that 7z is allowed to use.
+                 */
+                $options .= ' -mmem=64m';
+                break;
+        }
+        if (!empty($password)) {
+            $options .= ' -mhe=on -p' . escapeshellarg($password);
+        }
+        return $options;
+    }
+
+    /**
+     * Returns decompression options for 7z
+     * @param string $password password if any
+     * @return string
+     */
+    protected static function get7zDecompressOptions($password)
+    {
+        /**
+         * List of 7z options is here:
+         * https://linux.die.net/man/1/7z
+         * https://sevenzip.osdn.jp/chm/cmdline/syntax.htm
+         * https://sevenzip.osdn.jp/chm/cmdline/switches/
+         */
+        $options = array(
+            /**
+             * Disable multithread mode, use less CPU
+             */
+            '-mmt=off',
+
+            /**
+             * Disable progress indicator
+             */
+            '-bd',
+
+            /**
+             * Assume yes on all queries
+             * https://sevenzip.osdn.jp/chm/cmdline/switches/yes.htm
+             */
+            '-y',
+        );
+        $options = implode(" ", $options);
+        if (!empty($password)) {
+            $options .= ' -p' . escapeshellarg($password);
+        }
+        return $options;
+    }
+
+    /**
+     * Clears expired backups.
+     * The backup directory must be mounted before calling this method.
+     * @param integer $server_id
+     * @param integer $web_id id of the website
+     * @param integer $max_backup_copies number of backup copies to keep, all files beyond the limit will be erased
+     * @param string $backup_dir directory to scan
+     * @return bool
+     * @see backup_plugin::backups_garbage_collection() call this method first
+     * @see backup_plugin::mount_backup_dir()
+     * @author Ramil Valitov <ramilvalitov@gmail.com>
+     */
+    protected static function clearBackups($server_id, $web_id, $max_backup_copies, $backup_dir)
+    {
+        global $app;
+
+        $files = self::get_files($backup_dir);
+        usort($files, function ($a, $b) use ($backup_dir) {
+            $time_a = filemtime($backup_dir . '/' . $a);
+            $time_b = filemtime($backup_dir . '/' . $b);
+            return ($time_a > $time_b) ? -1 : 1;
+        });
+
+        $db_list = array($app->db);
+        if ($app->db->dbHost != $app->dbmaster->dbHost)
+            array_push($db_list, $app->dbmaster);
+
+        //Delete old files that are beyond the limit
+        for ($n = $max_backup_copies; $n < sizeof($files); $n++) {
+            $filename = $files[$n];
+            $full_filename = $backup_dir . '/' . $filename;
+            $app->log('Backup file ' . $full_filename . ' is beyond the limit of ' . $max_backup_copies . " copies and will be deleted from disk and database", LOGLEVEL_DEBUG);
+            $sql = "DELETE FROM web_backup WHERE server_id = ? AND parent_domain_id = ? AND filename = ?";
+            foreach ($db_list as $db) {
+                $db->query($sql, $server_id, $web_id, $filename);
+            }
+            @unlink($full_filename);
+        }
+        return true;
+    }
+
+    /**
+     * Garbage collection: deletes records from database about files that do not exist and deletes untracked files.
+     * The backup directory must be mounted before calling this method.
+     * @param int $server_id
+     * @param string|null $backup_type if defined then process only backups of this type
+     * @param string|null $domain_id if defined then process only backups that belong to this domain
+     * @author Ramil Valitov <ramilvalitov@gmail.com>
+     * @see backup_plugin::mount_backup_dir()
+     */
+    protected static function backups_garbage_collection($server_id, $backup_type = null, $domain_id = null)
+    {
+        global $app;
+
+        //First check that all records in database have related files and delete records without files on disk
+        $args = array();
+        $args_domains = array();
+        $server_config = $app->getconf->get_server_config($server_id, 'server');
+        $backup_dir = trim($server_config['backup_dir']);
+        $sql = "SELECT * FROM web_backup WHERE server_id = ?";
+        $sql_domains = "SELECT domain_id,system_user,system_group,backup_interval FROM web_domain WHERE server_id = ? AND (type = 'vhost' OR type = 'vhostsubdomain' OR type = 'vhostalias')";
+        array_push($args, $server_id);
+        array_push($args_domains, $server_id);
+        if (!empty($backup_type)) {
+            $sql .= " AND backup_type = ?";
+            array_push($args, $backup_type);
+        }
+        if (!empty($domain_id)) {
+            $sql .= " AND parent_domain_id = ?";
+            $sql_domains .= " AND domain_id = ?";
+            array_push($args, $domain_id);
+            array_push($args_domains, $domain_id);
+        }
+        array_unshift($args, $sql);
+        array_unshift($args_domains, $sql_domains);
+
+        $db_list = array($app->db);
+        if ($app->db->dbHost != $app->dbmaster->dbHost)
+            array_push($db_list, $app->dbmaster);
+
+        foreach ($db_list as $db) {
+            $backups = call_user_func_array(array($db, "queryAllRecords"), $args);
+            foreach ($backups as $backup) {
+                $backup_file = $backup_dir . '/web' . $backup['parent_domain_id'] . '/' . $backup['filename'];
+                if (!is_file($backup_file)) {
+                    $app->log('Backup file ' . $backup_file . ' does not exist on disk, deleting this entry from database', LOGLEVEL_DEBUG);
+                    $sql = "DELETE FROM web_backup WHERE backup_id = ?";
+                    $db->query($sql, $backup['backup_id']);
+                }
+            }
+        }
+
+        foreach ($db_list as $db) {
+            $domains = call_user_func_array(array($db, "queryAllRecords"), $args_domains);
+            foreach ($domains as $rec) {
+                $domain_id = $rec['domain_id'];
+                $domain_backup_dir = $backup_dir . '/web' . $domain_id;
+                $files = self::get_files($domain_backup_dir);
+
+                //Delete files that are in backup directory, but do not exist in database
+                if (!empty($files)) {
+                    $sql = "SELECT backup_id,filename FROM web_backup WHERE server_id = ? AND parent_domain_id = ?";
+                    $backups = $db->queryAllRecords($sql, $server_id, $domain_id);
+                    foreach ($backups as $backup) {
+                        if (!in_array($backup['filename'],$files)) {
+                            $backup_file = $backup_dir . '/web' . $domain_id . '/' . $backup['filename'];
+                            $app->log('Backup file ' . $backup_file . ' is not contained in database, deleting this file from disk', LOGLEVEL_DEBUG);
+                            @unlink($backup_file);
+                        }
+                    }
+                }
+
+                //Remove backupdir symlink and create as directory instead
+                $web_path = $rec['document_root'];
+                $app->system->web_folder_protection($web_path, false);
+
+                $backup_download_dir = $web_path . '/backup';
+                if (is_link($backup_download_dir)) {
+                    unlink($backup_download_dir);
+                }
+                if (!is_dir($backup_download_dir)) {
+                    mkdir($backup_download_dir);
+                    chown($backup_download_dir, $rec['system_user']);
+                    chgrp($backup_download_dir, $rec['system_group']);
+                }
+
+                $app->system->web_folder_protection($web_path, true);
+
+                // delete old files from backup download dir (/var/www/example.com/backup)
+                if (is_dir($backup_download_dir)) {
+                    $dir_handle = dir($backup_download_dir);
+                    $now = time();
+                    while (false !== ($entry = $dir_handle->read())) {
+                        $full_filename = $backup_download_dir . '/' . $entry;
+                        if ($entry != '.' && $entry != '..' && is_file($full_filename)) {
+                            // delete files older than 3 days
+                            if ($now - filemtime($full_filename) >= 60 * 60 * 24 * 3) {
+                                $app->log('Backup file ' . $full_filename . ' is too old, deleting this file from disk', LOGLEVEL_DEBUG);
+                                @unlink($full_filename);
+                            }
+                        }
+                    }
+                    $dir_handle->close();
+                }
+            }
+        }
+    }
+
+    /**
+     * Gets list of files in directory
+     * @param string $directory
+     * @param string[]|null $prefix_list filter files that have one of the prefixes. Use null for default filtering.
+     * @param string[]|null $endings_list filter files that have one of the endings. Use null for default filtering.
+     * @return string[]
+     * @author Ramil Valitov <ramilvalitov@gmail.com>
+     */
+    protected static function get_files($directory, $prefix_list = null, $endings_list = null)
+    {
+        $default_prefix_list = array(
+            'web',
+            'manual-web',
+            'db_',
+            'manual-db_',
+        );
+        $default_endings_list = array(
+            '.gz',
+            '.7z',
+            '.rar',
+            '.zip',
+            '.xz',
+            '.bz2',
+        );
+        if (is_null($prefix_list))
+            $prefix_list = $default_prefix_list;
+        if (is_null($endings_list))
+            $endings_list = $default_endings_list;
+
+        $dir_handle = dir($directory);
+        $files = array();
+        while (false !== ($entry = $dir_handle->read())) {
+            $full_filename = $directory . '/' . $entry;
+            if ($entry != '.' && $entry != '..' && is_file($full_filename)) {
+                if (!empty($prefix_list)) {
+                    $add = false;
+                    foreach ($prefix_list as $prefix) {
+                        if (substr($entry, 0, strlen($prefix)) == $prefix) {
+                            $add = true;
+                            break;
+                        }
+                    }
+                } else
+                    $add = true;
+                if ($add && !empty($endings_list)) {
+                    $add = false;
+                    foreach ($endings_list as $ending) {
+                        if (substr($entry, -strlen($ending)) == $ending) {
+                            $add = true;
+                            break;
+                        }
+                    }
+                }
+                if ($add)
+                    array_push($files, $entry);
+            }
+        }
+        $dir_handle->close();
+
+        return $files;
+    }
+
+    /**
+     * Generates excludes list for compressors
+     * @param string[] $backup_excludes
+     * @param string $arg
+     * @return string
+     * @author Ramil Valitov <ramilvalitov@gmail.com>
+     */
+    protected static function generateExcludeList($backup_excludes, $arg)
+    {
+        $excludes = implode(" " . $arg, $backup_excludes);
+        if (!empty($excludes)) {
+            $excludes = $arg . $excludes;
+        }
+        return $excludes;
+    }
+
+    /**
+     * Runs a web compression routine
+     * @param string $format
+     * @param string[] $backup_excludes
+     * @param string $backup_mode
+     * @param string $web_path
+     * @param string $web_backup_dir
+     * @param string $web_backup_file
+     * @param string $web_user
+     * @param string $web_group
+     * @param string $http_server_user
+     * @param string $backup_tmp
+     * @param string|null $password
+     * @return bool true if success
+     * @author Ramil Valitov <ramilvalitov@gmail.com>
+     */
+    protected static function runWebCompression($format, $backup_excludes, $backup_mode, $web_path, $web_backup_dir, $web_backup_file, $web_user, $web_group, $http_server_user, $backup_tmp, $password)
+    {
+        global $app;
+
+        $find_user_files = 'cd ? && sudo -u ? find . -group ? -or -user ? -print 2> /dev/null';
+        $excludes = self::generateExcludeList($backup_excludes, '--exclude=');
+        $tar_dir = 'tar pcf - ' . $excludes . ' --directory ? .';
+        $tar_input = 'tar pcf --null -T -';
+
+        $app->log('Performing web files backup of ' . $web_path . ' in format ' . $format . ', mode ' . $backup_mode, LOGLEVEL_DEBUG);
+        switch ($format) {
+            case 'tar_gzip':
+                if ($app->system->is_installed('pigz')) {
+                    //use pigz
+                    if ($backup_mode == 'user_zip') {
+                        $app->system->exec_safe($find_user_files . ' | ' . $tar_input . ' | pigz > ?', $web_path, $web_user, $web_group, $http_server_user, $web_path, $web_backup_dir . '/' . $web_backup_file);
+                    } else {
+                        //Standard casual behaviour of ISPConfig
+                        $app->system->exec_safe($tar_dir . ' | pigz > ?', $web_path, $web_backup_dir . '/' . $web_backup_file);
+                    }
+                    $exit_code = $app->system->last_exec_retcode();
+                    return $exit_code == 0;
+                } else {
+                    //use gzip
+                    if ($backup_mode == 'user_zip') {
+                        $app->system->exec_safe($find_user_files . ' | tar pczf ? --null -T -', $web_path, $web_user, $web_group, $http_server_user, $web_backup_dir . '/' . $web_backup_file);
+                    } else {
+                        //Standard casual behaviour of ISPConfig
+                        $app->system->exec_safe('tar pczf ? ' . $excludes . ' --directory ? .', $web_backup_dir . '/' . $web_backup_file, $web_path);
+                    }
+                    $exit_code = $app->system->last_exec_retcode();
+                    // tar can return 1 and still create valid backups
+                    return ($exit_code == 0 || $exit_code == 1);
+                }
+            case 'zip':
+            case 'zip_bzip2':
+                $zip_options = ($format === 'zip_bzip2') ? ' -Z bzip2 ' : '';
+                if (!empty($password)) {
+                    $zip_options .= ' --password ' . escapeshellarg($password);
+                }
+                if ($backup_mode == 'user_zip') {
+                    //Standard casual behaviour of ISPConfig
+                    $app->system->exec_safe($find_user_files . ' | zip ' . $zip_options . ' -b ? ' . $excludes . ' --symlinks ? -@', $web_path, $web_user, $web_group, $http_server_user, $backup_tmp, $web_backup_dir . '/' . $web_backup_file);
+                } else {
+                    //Use cd to have a correct directory structure inside the archive, extra options to zip hidden (dot) files
+                    $app->system->exec_safe('cd ? && zip ' . $zip_options . ' -b ? ' . $excludes . ' --symlinks -r ? * .* -x "../*"', $web_path, $backup_tmp, $web_backup_dir . '/' . $web_backup_file);
+                }
+                $exit_code = $app->system->last_exec_retcode();
+                // zip can return 12(due to harmless warnings) and still create valid backups
+                return ($exit_code == 0 || $exit_code == 12);
+            case 'tar_bzip2':
+                if ($backup_mode == 'user_zip') {
+                    $app->system->exec_safe($find_user_files . ' | tar pcjf ? --null -T -', $web_path, $web_user, $web_group, $http_server_user, $web_backup_dir . '/' . $web_backup_file);
+                } else {
+                    $app->system->exec_safe('tar pcjf ? ' . $excludes . ' --directory ? .', $web_backup_dir . '/' . $web_backup_file, $web_path);
+                }
+                $exit_code = $app->system->last_exec_retcode();
+                // tar can return 1 and still create valid backups
+                return ($exit_code == 0 || $exit_code == 1);
+            case 'tar_xz':
+                if ($backup_mode == 'user_zip') {
+                    $app->system->exec_safe($find_user_files . ' | tar pcJf ? --null -T -', $web_path, $web_user, $web_group, $http_server_user, $web_backup_dir . '/' . $web_backup_file);
+                } else {
+                    $app->system->exec_safe('tar pcJf ? ' . $excludes . ' --directory ? .', $web_backup_dir . '/' . $web_backup_file, $web_path);
+                }
+                $exit_code = $app->system->last_exec_retcode();
+                // tar can return 1 and still create valid backups
+                return ($exit_code == 0 || $exit_code == 1);
+            case 'rar':
+                $options = self::getRarOptions($backup_tmp,$password);
+                if ($backup_mode != 'user_zip') {
+                    //Recurse subfolders, otherwise we will pass a list of files to compress
+                    $options .= ' -r';
+                }
+                $excludes = self::generateExcludeList($backup_excludes, '-x');
+                $zip_command = 'rar a ' . $options . ' '.$excludes.' ?';
+                if ($backup_mode == 'user_zip') {
+                    $app->system->exec_safe($find_user_files . ' | ' . $zip_command . ' ? @', $web_path, $web_user, $web_group, $http_server_user, $web_path, $web_backup_dir . '/' . $web_backup_file);
+                } else {
+                    $app->system->exec_safe('cd ? && ' . $zip_command . ' .', $web_path, $web_backup_dir . '/' . $web_backup_file);
+                }
+                $exit_code = $app->system->last_exec_retcode();
+                return ($exit_code == 0 || $exit_code == 1);
+        }
+        if (strpos($format, "tar_7z_") === 0) {
+            $options = self::get7zCompressOptions($format, $password);
+            $zip_command = '7z a ' . $options . ' -si ?';
+            if ($backup_mode == 'user_zip') {
+                $app->system->exec_safe($find_user_files . ' | ' . $tar_input . ' | '. $zip_command, $web_path, $web_user, $web_group, $http_server_user, $web_path, $web_backup_dir . '/' . $web_backup_file);
+            } else {
+                $app->system->exec_safe($tar_dir . ' | ' . $zip_command, $web_path, $web_backup_dir . '/' . $web_backup_file);
+            }
+            $exit_code = $app->system->last_exec_retcode();
+            return $exit_code == 0;
+        }
+        return false;
+    }
+
+    /**
+     * Runs a database compression routine
+     * @param string $format
+     * @param string $db_backup_dir
+     * @param string $db_backup_file
+     * @param string $compressed_backup_file
+     * @param string $backup_tmp
+     * @param string|null $password
+     * @return bool true if success
+     * @author Ramil Valitov <ramilvalitov@gmail.com>
+     */
+    protected static function runDatabaseCompression($format, $db_backup_dir, $db_backup_file, $compressed_backup_file, $backup_tmp, $password)
+    {
+        global $app;
+
+        $app->log('Performing database backup to file ' . $compressed_backup_file . ' in format ' . $format, LOGLEVEL_DEBUG);
+        switch ($format) {
+            case 'gzip':
+                if ($app->system->is_installed('pigz')) {
+                    //use pigz
+                    $zip_cmd = 'pigz';
+                } else {
+                    //use gzip
+                    $zip_cmd = 'gzip';
+                }
+                $app->system->exec_safe($zip_cmd . " -c ? > ?", $db_backup_dir . '/' . $db_backup_file, $db_backup_dir . '/' . $compressed_backup_file);
+                $exit_code = $app->system->last_exec_retcode();
+                return $exit_code == 0;
+            case 'zip':
+            case 'zip_bzip2':
+                $zip_options = ($format === 'zip_bzip2') ? ' -Z bzip2 ' : '';
+                if (!empty($password)) {
+                    $zip_options .= ' --password ' . escapeshellarg($password);
+                }
+                $app->system->exec_safe('zip ' . $zip_options . ' -j -b ? ? ?', $backup_tmp, $db_backup_dir . '/' . $compressed_backup_file, $db_backup_dir . '/' . $db_backup_file);
+                $exit_code = $app->system->last_exec_retcode();
+                // zip can return 12(due to harmless warnings) and still create valid backups
+                return ($exit_code == 0 || $exit_code == 12);
+            case 'bzip2':
+                $app->system->exec_safe("bzip2 -q -c ? > ?", $db_backup_dir . '/' . $db_backup_file, $db_backup_dir . '/' . $compressed_backup_file);
+                $exit_code = $app->system->last_exec_retcode();
+                return $exit_code == 0;
+            case 'xz':
+                $app->system->exec_safe("xz -q -q -c ? > ?", $db_backup_dir . '/' . $db_backup_file, $db_backup_dir . '/' . $compressed_backup_file);
+                $exit_code = $app->system->last_exec_retcode();
+                return $exit_code == 0;
+            case 'rar':
+                $options = self::getRarOptions($backup_tmp, $password);
+                $zip_command = 'rar a ' . $options . ' ? ?';
+                $app->system->exec_safe($zip_command, $db_backup_dir . '/' . $compressed_backup_file, $db_backup_dir . '/' . $db_backup_file);
+                $exit_code = $app->system->last_exec_retcode();
+                return ($exit_code == 0 || $exit_code == 1);
+        }
+        if (strpos($format, "7z_") === 0) {
+            $options = self::get7zCompressOptions($format, $password);
+            $zip_command = '7z a ' . $options . ' ? ?';
+            $app->system->exec_safe($zip_command, $db_backup_dir . '/' . $compressed_backup_file, $db_backup_dir . '/' . $db_backup_file);
+            $exit_code = $app->system->last_exec_retcode();
+            return $exit_code == 0;
+        }
+        return false;
+    }
+
+    /**
+     * Mounts the backup directory if required
+     * @param int $server_id
+     * @return bool true if success
+     * @author Ramil Valitov <ramilvalitov@gmail.com>
+     * @see backup_plugin::unmount_backup_dir()
+     */
+    public static function mount_backup_dir($server_id)
+    {
+        global $app;
+
+        $server_config = $app->getconf->get_server_config($server_id, 'server');
+        if ($server_config['backup_dir_is_mount'] == 'y')
+            return $app->system->mount_backup_dir($server_config['backup_dir']);
+        return true;
+    }
+
+    /**
+     * Unmounts the backup directory if required
+     * @param int $server_id
+     * @return bool true if success
+     * @author Ramil Valitov <ramilvalitov@gmail.com>
+     * @see backup_plugin::mount_backup_dir()
+     */
+    public static function unmount_backup_dir($server_id)
+    {
+        global $app;
+
+        $server_config = $app->getconf->get_server_config($server_id, 'server');
+        if ($server_config['backup_dir_is_mount'] == 'y')
+            return $app->system->umount_backup_dir($server_config['backup_dir']);
+        return true;
+    }
+
+    /**
+     * Makes backup of database.
+     * The backup directory must be mounted before calling this method.
+     * This method is for private use only, don't call this method unless you know what you're doing.
+     * @param array $web_domain
+     * @param string $backup_job type of backup job: manual or auto
+     * @return bool true if success
+     * @author Ramil Valitov <ramilvalitov@gmail.com>
+     * @see backup_plugin::run_backup() recommeneded to use if you need to make backups
+     */
+    protected static function make_database_backup($web_domain, $backup_job)
+    {
+        global $app;
+
+        $server_id = intval($web_domain['server_id']);
+        $domain_id = intval($web_domain['domain_id']);
+        $server_config = $app->getconf->get_server_config($server_id, 'server');
+        $backup_dir = trim($server_config['backup_dir']);
+        $backup_tmp = trim($server_config['backup_tmp']);
+        $db_backup_dir = $backup_dir . '/web' . $domain_id;
+        $success = false;
+
+        if (empty($backup_job))
+            $backup_job = "auto";
+
+        $records = $app->db->queryAllRecords("SELECT * FROM web_database WHERE server_id = ? AND parent_domain_id = ?", $server_id, $domain_id);
+        if (empty($records)){
+            $app->log('Skipping database backup for domain ' . $web_domain['domain_id'] . ', because no related databases found.', LOGLEVEL_ERROR);
+            return true;
+        }
+
+        self::prepare_backup_dir($server_id, $web_domain);
+
+        include '/usr/local/ispconfig/server/lib/mysql_clientdb.conf';
+
+        //* Check mysqldump capabilities
+        exec('mysqldump --help', $tmp);
+        $mysqldump_routines = (strpos(implode($tmp), '--routines') !== false) ? '--routines' : '';
+        unset($tmp);
+
+        foreach ($records as $rec) {
+            $password = ($web_domain['backup_encrypt'] == 'y') ? trim($web_domain['backup_password']) : '';
+            $backup_format_db = $web_domain['backup_format_db'];
+            if (empty($backup_format_db)) {
+                $backup_format_db = 'gzip';
+            }
+            $backup_extension_db = self::getBackupDbExtension($backup_format_db);
+
+            if (!empty($backup_extension_db)) {
+                //* Do the mysql database backup with mysqldump
+                $db_name = $rec['database_name'];
+                $db_file_prefix = 'db_' . $db_name . '_' . date('Y-m-d_H-i');
+                $db_backup_file = $db_file_prefix . '.sql';
+                $db_compressed_file = ($backup_job == 'manual' ? 'manual-' : '') . $db_file_prefix . $backup_extension_db;
+                $command = "mysqldump -h ? -u ? -p? -c --add-drop-table --create-options --quick --max_allowed_packet=512M " . $mysqldump_routines . " --result-file=? ?";
+                /** @var string $clientdb_host */
+                /** @var string $clientdb_user */
+                /** @var string $clientdb_password */
+                $app->system->exec_safe($command, $clientdb_host, $clientdb_user, $clientdb_password, $db_backup_dir . '/' . $db_backup_file, $db_name);
+                $exit_code = $app->system->last_exec_retcode();
+
+                //* Compress the backup
+                if ($exit_code == 0) {
+                    $exit_code = self::runDatabaseCompression($backup_format_db, $db_backup_dir, $db_backup_file, $db_compressed_file, $backup_tmp, $password) ? 0 : 1;
+                    if ($exit_code !== 0)
+                        $app->log('Failed to make backup of database ' . $rec['database_name'], LOGLEVEL_ERROR);
+                } else {
+                    $app->log('Failed to make backup of database ' . $rec['database_name'] . ', because mysqldump failed', LOGLEVEL_ERROR);
+                }
+
+                if ($exit_code == 0) {
+                    if (is_file($db_backup_dir . '/' . $db_compressed_file)) {
+                        chmod($db_backup_dir . '/' . $db_compressed_file, 0750);
+                        chown($db_backup_dir . '/' . $db_compressed_file, fileowner($db_backup_dir));
+                        chgrp($db_backup_dir . '/' . $db_compressed_file, filegroup($db_backup_dir));
+
+                        //* Insert web backup record in database
+                        $file_size = filesize($db_backup_dir . '/' . $db_compressed_file);
+                        $sql = "INSERT INTO web_backup (server_id, parent_domain_id, backup_type, backup_mode, backup_format, tstamp, filename, filesize, backup_password) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)";
+                        //Making compatible with previous versions of ISPConfig:
+                        $sql_mode = ($backup_format_db == 'gzip') ? 'sqlgz' : ('sql' . $backup_format_db);
+                        $app->db->query($sql, $server_id, $domain_id, 'mysql', $sql_mode, $backup_format_db, time(), $db_compressed_file, $file_size, $password);
+                        if ($app->db->dbHost != $app->dbmaster->dbHost)
+                            $app->dbmaster->query($sql, $server_id, $domain_id, 'mysql', $sql_mode, $backup_format_db, time(), $db_compressed_file, $file_size, $password);
+                        $success = true;
+                    }
+                } else {
+                    if (is_file($db_backup_dir . '/' . $db_compressed_file)) unlink($db_backup_dir . '/' . $db_compressed_file);
+                }
+                //* Remove the uncompressed file
+                if (is_file($db_backup_dir . '/' . $db_backup_file)) unlink($db_backup_dir . '/' . $db_backup_file);
+
+                //* Remove old backups
+                self::backups_garbage_collection($server_id, 'mysql', $domain_id);
+                self::clearBackups($server_id, $domain_id, intval($rec['backup_copies']), $db_backup_dir);
+            } else {
+                $app->log('Failed to process mysql backup format ' . $backup_format_db . ' for database ' . $rec['database_name'], LOGLEVEL_ERROR);
+            }
+        }
+
+        unset($clientdb_host);
+        unset($clientdb_user);
+        unset($clientdb_password);
+
+        return $success;
+    }
+
+    /**
+     * Makes backup of web files.
+     * The backup directory must be mounted before calling this method.
+     * This method is for private use only, don't call this method unless you know what you're doing
+     * @param array $web_domain info about domain to backup, SQL record of table 'web_domain'
+     * @param string $backup_job type of backup job: manual or auto
+     * @return bool true if success
+     * @author Ramil Valitov <ramilvalitov@gmail.com>
+     * @see backup_plugin::mount_backup_dir()
+     * @see backup_plugin::run_backup() recommeneded to use if you need to make backups
+     */
+    protected static function make_web_backup($web_domain, $backup_job)
+    {
+        global $app;
+
+        $server_id = intval($web_domain['server_id']);
+        $domain_id = intval($web_domain['domain_id']);
+        $server_config = $app->getconf->get_server_config($server_id, 'server');
+        $global_config = $app->getconf->get_global_config('sites');
+        $backup_dir = trim($server_config['backup_dir']);
+        $backup_mode = $server_config['backup_mode'];
+        $backup_tmp = trim($server_config['backup_tmp']);
+        if (empty($backup_mode))
+            $backup_mode = 'userzip';
+
+        $web_config = $app->getconf->get_server_config($server_id, 'web');
+        $http_server_user = $web_config['user'];
+
+        if (empty($backup_dir)) {
+            $app->log('Failed to make backup of web files for domain id ' . $domain_id . ' on server id ' . $server_id . ', because backup directory is not defined', LOGLEVEL_ERROR);
+            return false;
+        }
+        if (empty($backup_job))
+            $backup_job = "auto";
+
+        $backup_format_web = $web_domain['backup_format_web'];
+        //Check if we're working with data saved in old version of ISPConfig
+        if (empty($backup_format_web)) {
+            $backup_format_web = 'default';
+        }
+        if ($backup_format_web == 'default') {
+            if ($backup_mode == 'userzip')
+                $backup_format_web = 'zip';
+            else
+                $backup_format_web = 'gzip';
+        }
+        $password = ($web_domain['backup_encrypt'] == 'y') ? trim($web_domain['backup_password']) : '';
+        $backup_extension_web = self::getBackupWebExtension($backup_format_web);
+        if (empty($backup_extension_web)) {
+            $app->log('Failed to make backup of web files, because of unknown backup format ' . $backup_format_web . ' for website ' . $web_domain['domain'], LOGLEVEL_ERROR);
+            return false;
+        }
+
+        $web_path = $web_domain['document_root'];
+        $web_user = $web_domain['system_user'];
+        $web_group = $web_domain['system_group'];
+        $web_id = $web_domain['domain_id'];
+
+        self::prepare_backup_dir($server_id, $web_domain);
+        $web_backup_dir = $backup_dir . '/web' . $web_id;
+
+        $backup_excludes = array(escapeshellarg('./backup\*'));
+        $b_excludes = explode(',', trim($web_domain['backup_excludes']));
+        if (is_array($b_excludes) && !empty($b_excludes)) {
+            foreach ($b_excludes as $b_exclude) {
+                $b_exclude = trim($b_exclude);
+                if ($b_exclude != '') {
+                    array_push($backup_excludes, escapeshellarg($b_exclude));
+                }
+            }
+        }
+
+        $web_backup_file = ($backup_job == 'manual' ? 'manual-' : '') . 'web' . $web_id . '_' . date('Y-m-d_H-i') . $backup_extension_web;
+        $full_filename = $web_backup_dir . '/' . $web_backup_file;
+        if (self::runWebCompression($backup_format_web, $backup_excludes, $backup_mode, $web_path, $web_backup_dir, $web_backup_file, $web_user, $web_group, $http_server_user, $backup_tmp, $password)) {
+            if (is_file($full_filename)) {
+                $backup_username = ($global_config['backups_include_into_web_quota'] == 'y') ? $web_user : 'root';
+                $backup_group = ($global_config['backups_include_into_web_quota'] == 'y') ? $web_group : 'root';
+                chown($full_filename, $backup_username);
+                chgrp($full_filename, $backup_group);
+                chmod($full_filename, 0750);
+
+                //Insert web backup record in database
+                $file_size = filesize($full_filename);
+                $sql = "INSERT INTO web_backup (server_id, parent_domain_id, backup_type, backup_mode, backup_format, tstamp, filename, filesize, backup_password) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)";
+                $app->db->query($sql, $server_id, $web_id, 'web', $backup_mode, $backup_format_web, time(), $web_backup_file, $file_size, $password);
+                if ($app->db->dbHost != $app->dbmaster->dbHost)
+                    $app->dbmaster->query($sql, $server_id, $web_id, 'web', $backup_mode, $backup_format_web, time(), $web_backup_file, $file_size, $password);
+                unset($file_size);
+                $app->log('Backup of web files for domain ' . $web_domain['domain'] . ' completed successfully to file ' . $full_filename, LOGLEVEL_DEBUG);
+            } else {
+                $app->log('Backup of web files for domain ' . $web_domain['domain'] . ' reported success, but the resulting file ' . $full_filename . ' not found.', LOGLEVEL_ERROR);
+            }
+
+        } else {
+            if (is_file($full_filename))
+                unlink($full_filename);
+            $app->log('Backup of web files for domain ' . $web_domain['domain'] . ' failed using path ' . $web_path . ' failed.', LOGLEVEL_ERROR);
+        }
+
+        self::clearBackups($server_id, $web_id, intval($web_domain['backup_copies']), $web_backup_dir);
+        return true;
+    }
+
+    /**
+     * Creates and prepares a backup dir
+     * @param int $server_id
+     * @param array $domain_data
+     * @author Ramil Valitov <ramilvalitov@gmail.com>
+     */
+    protected static function prepare_backup_dir($server_id, $domain_data)
+    {
+        global $app;
+
+        $server_config = $app->getconf->get_server_config($server_id, 'server');
+        $global_config = $app->getconf->get_global_config('sites');
+
+        if (isset($server_config['backup_dir_ftpread']) && $server_config['backup_dir_ftpread'] == 'y') {
+            $backup_dir_permissions = 0755;
+        } else {
+            $backup_dir_permissions = 0750;
+        }
+
+        $backup_dir = $server_config['backup_dir'];
+
+        if (!is_dir($backup_dir)) {
+            mkdir($backup_dir, $backup_dir_permissions, true);
+        } else {
+            chmod($backup_dir, $backup_dir_permissions);
+        }
+
+        $web_backup_dir = $backup_dir . '/web' . $domain_data['domain_id'];
+        if (!is_dir($web_backup_dir))
+            mkdir($web_backup_dir, 0750);
+        chmod($web_backup_dir, 0750);
+
+        $backup_username = 'root';
+        $backup_group = 'root';
+
+        if ($global_config['backups_include_into_web_quota'] == 'y') {
+            $backup_username = $domain_data['system_user'];
+            $backup_group = $domain_data['system_group'];
+        }
+        chown($web_backup_dir, $backup_username);
+        chgrp($web_backup_dir, $backup_group);
+    }
+
+    /**
+     * Makes a backup of website files or database.
+     * @param string|int $domain_id
+     * @param string $type backup type: web or mysql
+     * @param string $backup_job how the backup is initiated: manual or auto
+     * @param bool $mount if true, then the backup dir will be mounted and unmounted automatically
+     * @return bool returns true if success
+     * @author Ramil Valitov <ramilvalitov@gmail.com>
+     */
+    public static function run_backup($domain_id, $type, $backup_job, $mount = true)
+    {
+        global $app;
+
+        $domain_id = intval($domain_id);
+
+        $sql = "SELECT * FROM web_domain WHERE (type = 'vhost' OR type = 'vhostsubdomain' OR type = 'vhostalias') AND domain_id = ?";
+        $rec = $app->db->queryOneRecord($sql, $domain_id);
+        if (empty($rec)) {
+            $app->log('Failed to make backup of type ' . $type . ', because no information present about requested domain id ' . $domain_id, LOGLEVEL_ERROR);
+            return false;
+        }
+        $server_id = intval($rec['server_id']);
+
+        if ($mount && !self::mount_backup_dir($server_id)) {
+            $app->log('Failed to make backup of type ' . $type . ' for domain id ' . $domain_id . ', because failed to mount backup directory', LOGLEVEL_ERROR);
+            return false;
+        }
+        $ok = false;
+
+        switch ($type) {
+            case 'web':
+                $ok = self::make_web_backup($rec, $backup_job);
+                break;
+            case 'mysql':
+                $ok = self::make_database_backup($rec, $backup_job);
+                break;
+            default:
+                $app->log('Failed to make backup, because backup type is unknown: ' . $type, LOGLEVEL_ERROR);
+                break;
+        }
+        if ($mount)
+            self::unmount_backup_dir($server_id);
+        return $ok;
+    }
+
+    /**
+     * Runs backups of all websites that have backups enabled with respect to their backup interval settings
+     * @param int $server_id
+     * @param string $backup_job backup tupe: auto or manual
+     * @author Ramil Valitov <ramilvalitov@gmail.com>
+     */
+    public static function run_all_backups($server_id, $backup_job = "auto")
+    {
+        global $app;
+
+        $server_id = intval($server_id);
+
+        $sql = "SELECT * FROM web_domain WHERE server_id = ? AND (type = 'vhost' OR type = 'vhostsubdomain' OR type = 'vhostalias') AND active = 'y' AND backup_interval != 'none' AND backup_interval != ''";
+        $domains = $app->db->queryAllRecords($sql, $server_id);
+
+        if (!self::mount_backup_dir($server_id)) {
+            $app->log('Failed to run regular backups routine because failed to mount backup directory', LOGLEVEL_ERROR);
+            return;
+        }
+        self::backups_garbage_collection($server_id);
+
+        $date_of_week = date('w');
+        $date_of_month = date('d');
+        foreach ($domains as $domain) {
+            if (($domain['backup_interval'] == 'daily' or ($domain['backup_interval'] == 'weekly' && $date_of_week == 0) or ($domain['backup_interval'] == 'monthly' && $date_of_month == '01'))) {
+                self::run_backup($domain['domain_id'], 'web', $backup_job, false);
+                self::run_backup($domain['domain_id'], 'mysql', $backup_job, false);
+            }
+        }
+        self::unmount_backup_dir($server_id);
+    }
+}
+
+?>
+
diff --git a/server/lib/classes/cron.d/500-backup.inc.php b/server/lib/classes/cron.d/500-backup.inc.php
index 9329be7c2e..cf4272991e 100644
--- a/server/lib/classes/cron.d/500-backup.inc.php
+++ b/server/lib/classes/cron.d/500-backup.inc.php
@@ -33,11 +33,6 @@ class cronjob_backup extends cronjob {
 	// job schedule
 	protected $_schedule = '0 0 * * *';
 
-	/**
-	 * The maximum number of backups that ISPConfig can store.
-	 */
-	const max_backups = 30;
-
 	/* this function is optional if it contains no custom code */
 	public function onPrepare() {
 		global $app;
@@ -55,363 +50,8 @@ class cronjob_backup extends cronjob {
 	public function onRunJob() {
 		global $app, $conf;
 
-		$server_config = $app->getconf->get_server_config($conf['server_id'], 'server');
-		$global_config = $app->getconf->get_global_config('sites');
-		$backup_dir = trim($server_config['backup_dir']);
-		$backup_mode = $server_config['backup_mode'];
-		$backup_tmp = trim($server_config['backup_tmp']);
-		if($backup_mode == '') $backup_mode = 'userzip';
-
-		$web_config = $app->getconf->get_server_config($conf['server_id'], 'web');
-		$http_server_user = $web_config['user'];
-
-		if($backup_dir != '') {
-
-			if(isset($server_config['backup_dir_ftpread']) && $server_config['backup_dir_ftpread'] == 'y') {
-				$backup_dir_permissions = 0755;
-			} else {
-				$backup_dir_permissions = 0750;
-			}
-
-			if(!is_dir($backup_dir)) {
-				mkdir($backup_dir, $backup_dir_permissions, true);
-			} else {
-				chmod($backup_dir, $backup_dir_permissions);
-			}
-            $run_backups = true;
-            //* mount backup directory, if necessary
-            if( $server_config['backup_dir_is_mount'] == 'y' && !$app->system->mount_backup_dir($backup_dir) ) $run_backups = false;
-			if($run_backups){
-				$web_array = array();
-
-				system('which pigz > /dev/null', $ret);
-				if($ret === 0) {
-					$use_pigz = true;
-					$zip_cmd = 'pigz'; // db-backups
-				} else {
-					$use_pigz = false;
-					$zip_cmd = 'gzip'; // db-backups
-				}
-				
-				//* backup only active domains
-				$sql = "SELECT * FROM web_domain WHERE server_id = ? AND (type = 'vhost' OR type = 'vhostsubdomain' OR type = 'vhostalias') AND active = 'y'";
-				$records = $app->db->queryAllRecords($sql, $conf['server_id']);
-				if(is_array($records)) {
-					foreach($records as $rec) {
-
-						//* Do the website backup
-						if($rec['backup_interval'] == 'daily' or ($rec['backup_interval'] == 'weekly' && date('w') == 0) or ($rec['backup_interval'] == 'monthly' && date('d') == '01')) {
-
-							$web_path = $rec['document_root'];
-							$web_user = $rec['system_user'];
-							$web_group = $rec['system_group'];
-							$web_id = $rec['domain_id'];
-							if(!in_array($web_id, $web_array)) $web_array[] = $web_id;
-							$web_backup_dir = $backup_dir.'/web'.$web_id;
-							if(!is_dir($web_backup_dir)) mkdir($web_backup_dir, 0750);
-							chmod($web_backup_dir, 0750);
-							//if(isset($server_config['backup_dir_ftpread']) && $server_config['backup_dir_ftpread'] == 'y') {
-							chown($web_backup_dir, $rec['system_user']);
-							chgrp($web_backup_dir, $rec['system_group']);
-							/*} else {
-								chown($web_backup_dir, 'root');
-								chgrp($web_backup_dir, 'root');
-							}*/
-						
-							$backup_excludes = '';
-							$b_excludes = explode(',', trim($rec['backup_excludes']));
-							if(is_array($b_excludes) && !empty($b_excludes)){
-								foreach($b_excludes as $b_exclude){
-									$b_exclude = trim($b_exclude);
-									if($b_exclude != ''){
-										$backup_excludes .= ' --exclude='.escapeshellarg($b_exclude);
-									}
-								}
-							}
-						
-							if($backup_mode == 'userzip') {
-								//* Create a .zip backup as web user and include also files owned by apache / nginx user
-								$web_backup_file = 'web'.$web_id.'_'.date('Y-m-d_H-i').'.zip';
-								$app->system->exec_safe('cd ? && sudo -u ? find . -group ? -or -user ? -print 2> /dev/null | zip -b ? --exclude=./backup\*'.$backup_excludes.' --symlinks ? -@', $web_path, $web_user, $web_group, $http_server_user, $backup_tmp, $web_backup_dir.'/'.$web_backup_file);
-								$retval = $app->system->last_exec_retcode();
-							} else {
-								//* Create a tar.gz backup as root user
-								$web_backup_file = 'web'.$web_id.'_'.date('Y-m-d_H-i').'.tar.gz';
-								if ($use_pigz) {
-									$app->system->exec_safe('tar pcf - --exclude=./backup\*'.$backup_excludes.' --directory ? . | pigz > ?', $web_path, $web_backup_dir.'/'.$web_backup_file);
-									$retval = $app->system->last_exec_retcode();
-								} else {
-									$app->system->exec_safe('tar pczf ? --exclude=./backup\*'.$backup_excludes.' --directory ? .', $web_backup_dir.'/'.$web_backup_file, $web_path);
-									$retval = $app->system->last_exec_retcode();
-								}
-							}
-							if($retval == 0 || ($backup_mode != 'userzip' && $retval == 1) || ($backup_mode == 'userzip' && $retval == 12)) { // tar can return 1, zip can return 12(due to harmless warings) and still create valid backups  
-								if(is_file($web_backup_dir.'/'.$web_backup_file)){
-									$backupusername = ($global_config['backups_include_into_web_quota'] == 'y') ? $web_user : 'root';
-									$backupgroup = ($global_config['backups_include_into_web_quota'] == 'y') ? $web_group : 'root';
-									chown($web_backup_dir.'/'.$web_backup_file, $backupusername);
-									chgrp($web_backup_dir.'/'.$web_backup_file, $backupgroup);
-									chmod($web_backup_dir.'/'.$web_backup_file, 0750);
-
-									//* Insert web backup record in database
-									$filesize = filesize($web_backup_dir.'/'.$web_backup_file);
-									$sql = "INSERT INTO web_backup (server_id, parent_domain_id, backup_type, backup_mode, tstamp, filename, filesize) VALUES (?, ?, ?, ?, ?, ?, ?)";
-									$app->db->query($sql, $conf['server_id'], $web_id, 'web', $backup_mode, time(), $web_backup_file, $filesize);
-									if($app->db->dbHost != $app->dbmaster->dbHost) 
-										$app->dbmaster->query($sql, $conf['server_id'], $web_id, 'web', $backup_mode, time(), $web_backup_file, $filesize);
-									unset($filesize);
-								}
-							} else {
-								if(is_file($web_backup_dir.'/'.$web_backup_file)) unlink($web_backup_dir.'/'.$web_backup_file);
-								$app->log('Backup of '.$web_path.' failed.', LOGLEVEL_WARN);
-							}
-
-							//* Remove old backups
-							$backup_copies = intval($rec['backup_copies']);
-
-							$dir_handle = dir($web_backup_dir);
-							$files = array();
-							while (false !== ($entry = $dir_handle->read())) {
-								if($entry != '.' && $entry != '..' && substr($entry, 0, 3) == 'web' && is_file($web_backup_dir.'/'.$entry)) {
-									$files[] = $entry;
-								}
-							}
-							$dir_handle->close();
-
-							rsort($files);
-
-							for ($n = $backup_copies; $n <= self::max_backups; $n++) {
-								if(isset($files[$n]) && is_file($web_backup_dir.'/'.$files[$n])) {
-									$sql = "DELETE FROM web_backup WHERE server_id = ? AND parent_domain_id = ? AND filename = ?";
-									$app->db->query($sql, $conf['server_id'], $web_id, $files[$n]);
-									if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'],  $web_id, $files[$n]);
-									@unlink($web_backup_dir.'/'.$files[$n]);
-								}
-							}
-
-							unset($files);
-							unset($dir_handle);
-
-							//* Remove backupdir symlink and create as directory instead
-							$app->system->web_folder_protection($web_path, false);
-
-							if(is_link($web_path.'/backup')) {
-								unlink($web_path.'/backup');
-							}
-							if(!is_dir($web_path.'/backup')) {
-								mkdir($web_path.'/backup');
-								chown($web_path.'/backup', $rec['system_user']);
-								chgrp($web_path.'/backup', $rec['system_group']);
-							}
-
-							$app->system->web_folder_protection($web_path, true);
-						}
-
-						/* If backup_interval is set to none and we have a
-						backup directory for the website, then remove the backups */
-						if($rec['backup_interval'] == 'none' || $rec['backup_interval'] == '') {
-							$web_id = $rec['domain_id'];
-							$web_user = $rec['system_user'];
-							$web_backup_dir = realpath($backup_dir.'/web'.$web_id);
-							if(is_dir($web_backup_dir)) {
-								$dir_handle = opendir($web_backup_dir.'/');
-								while ($file = readdir($dir_handle)) {
-									if(!is_dir($file)) {
-										unlink ("$web_backup_dir/"."$file");
-									}
-								}
-							}
-							$sql = "DELETE FROM web_backup WHERE server_id = ? AND parent_domain_id = ?";
-							$app->db->query($sql, $conf['server_id'], $web_id);
-							if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $web_id);
-						}
-					}
-				}
-
-				$records = $app->db->queryAllRecords("SELECT * FROM web_database WHERE server_id = ? AND backup_interval != 'none' AND backup_interval != ''", $conf['server_id']);
-				if(is_array($records)) {
-
-					include '/usr/local/ispconfig/server/lib/mysql_clientdb.conf';
-					
-					//* Check mysqldump capabilities
-					exec('mysqldump --help',$tmp);
-					$mysqldump_routines = (strpos(implode($tmp),'--routines') !== false)?'--routines':'';
-					unset($tmp);
-
-					foreach($records as $rec) {
-
-						//* Do the database backup
-						if($rec['backup_interval'] == 'daily' or ($rec['backup_interval'] == 'weekly' && date('w') == 0) or ($rec['backup_interval'] == 'monthly' && date('d') == '01')) {
-
-							$web_id = $rec['parent_domain_id'];
-							if(!in_array($web_id, $web_array)) $web_array[] = $web_id;
-							$db_backup_dir = $backup_dir.'/web'.$web_id;
-							if(!is_dir($db_backup_dir)) mkdir($db_backup_dir, 0750);
-							chmod($db_backup_dir, 0750);
-							$backupusername = 'root';
-							$backupgroup = 'root';
-							if ($global_config['backups_include_into_web_quota'] == 'y') {
-								$sql = "SELECT * FROM web_domain WHERE domain_id = ".$rec['parent_domain_id'];
-								$webdomain = $app->db->queryOneRecord($sql);
-								$backupusername = $webdomain['system_user'];
-								$backupgroup = $webdomain['system_group'];
-							}
-							chown($db_backup_dir, $backupusername);
-							chgrp($db_backup_dir, $backupgroup);
-
-							//* Do the mysql database backup with mysqldump
-							$db_id = $rec['database_id'];
-							$db_name = $rec['database_name'];
-							$db_backup_file = 'db_'.$db_name.'_'.date('Y-m-d_H-i').'.sql';
-							$command = "mysqldump -h ? -u ? -p? -c --add-drop-table --create-options --quick --max_allowed_packet=512M ".$mysqldump_routines." --result-file=? ?";
-							$app->system->exec_safe($command, $clientdb_host, $clientdb_user, $clientdb_password, $db_backup_dir.'/'.$db_backup_file, $db_name);
-							$retval = $app->system->last_exec_retcode();
-							
-							//* Compress the backup with gzip / pigz
-							if($retval == 0) {
-								$app->system->exec_safe("$zip_cmd -c ? > ?", $db_backup_dir.'/'.$db_backup_file, $db_backup_dir.'/'.$db_backup_file . '.gz');
-								$retval = $app->system->last_exec_retcode();
-							}
-							
-							if($retval == 0){
-								if(is_file($db_backup_dir.'/'.$db_backup_file.'.gz')){
-									chmod($db_backup_dir.'/'.$db_backup_file.'.gz', 0750);
-									chown($db_backup_dir.'/'.$db_backup_file.'.gz', fileowner($db_backup_dir));
-									chgrp($db_backup_dir.'/'.$db_backup_file.'.gz', filegroup($db_backup_dir));
-
-									//* Insert web backup record in database
-									$filesize = filesize($db_backup_dir.'/'.$db_backup_file.'.gz');
-									$sql = "INSERT INTO web_backup (server_id, parent_domain_id, backup_type, backup_mode, tstamp, filename, filesize) VALUES (?, ?, ?, ?, ?, ?, ?)";
-									$app->db->query($sql, $conf['server_id'], $web_id, 'mysql', 'sqlgz', time(), $db_backup_file.'.gz', $filesize);
-									if($app->db->dbHost != $app->dbmaster->dbHost) 
-										$app->dbmaster->query($sql, $conf['server_id'], $web_id, 'mysql', 'sqlgz', time(), $db_backup_file.'.gz', $filesize);
-									unset($filesize);
-								}
-							} else {
-								if(is_file($db_backup_dir.'/'.$db_backup_file.'.gz')) unlink($db_backup_dir.'/'.$db_backup_file.'.gz');
-							}
-							//* Remove the uncompressed file
-							if(is_file($db_backup_dir.'/'.$db_backup_file)) unlink($db_backup_dir.'/'.$db_backup_file);
-
-							//* Remove old backups
-							$backup_copies = intval($rec['backup_copies']);
-
-							$dir_handle = dir($db_backup_dir);
-							$files = array();
-							while (false !== ($entry = $dir_handle->read())) {
-								if($entry != '.' && $entry != '..' && preg_match('/^db_('.$db_name.')_\d{4}-\d{2}-\d{2}_\d{2}-\d{2}\.sql.gz$/', $entry, $matches) && is_file($db_backup_dir.'/'.$entry)) {
-									if(array_key_exists($matches[1], $files) == false) $files[$matches[1]] = array();
-									$files[$matches[1]][] = $entry;
-								}
-							}
-							$dir_handle->close();
-
-							reset($files);
-							foreach($files as $db_name => $filelist) {
-								rsort($filelist);
-								for ($n = $backup_copies; $n <= self::max_backups; $n++) {
-									if(isset($filelist[$n]) && is_file($db_backup_dir.'/'.$filelist[$n])) {
-										$sql = "DELETE FROM web_backup WHERE server_id = ? AND parent_domain_id = ? AND filename = ?";
-										$app->db->query($sql, $conf['server_id'], $web_id, $filelist[$n]);
-										if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $web_id, $filelist[$n]);
-										@unlink($db_backup_dir.'/'.$filelist[$n]);
-									}
-								}
-							}
-
-							unset($files);
-							unset($dir_handle);
-						}
-					}
-
-					unset($clientdb_host);
-					unset($clientdb_user);
-					unset($clientdb_password);
-
-				}
-
-				// remove non-existing backups from database
-				$backups = $app->db->queryAllRecords("SELECT * FROM web_backup WHERE server_id = ?", $conf['server_id']);
-				if(is_array($backups) && !empty($backups)){
-					foreach($backups as $backup){
-						$backup_file = $backup_dir.'/web'.$backup['parent_domain_id'].'/'.$backup['filename'];
-						if(!is_file($backup_file)){
-							$sql = "DELETE FROM web_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){
-					$backups = $app->dbmaster->queryAllRecords("SELECT * FROM web_backup WHERE server_id = ?", $conf['server_id']);
-					if(is_array($backups) && !empty($backups)){
-						foreach($backups as $backup){
-							$backup_file = $backup_dir.'/web'.$backup['parent_domain_id'].'/'.$backup['filename'];
-							if(!is_file($backup_file)){
-								$sql = "DELETE FROM web_backup WHERE server_id = ? AND parent_domain_id = ? AND filename = ?";
-								$app->dbmaster->query($sql, $conf['server_id'], $backup['parent_domain_id'], $backup['filename']);
-							}
-						}
-					}
-				}
-				
-				// garbage collection (non-existing databases)
-				if(is_array($web_array) && !empty($web_array)){
-					foreach($web_array as $tmp_web_id){
-						$tmp_backup_dir = $backup_dir.'/web'.$tmp_web_id;
-						if(is_dir($tmp_backup_dir)){
-							$dir_handle = dir($tmp_backup_dir);
-							$files = array();
-							while (false !== ($entry = $dir_handle->read())) {
-								if($entry != '.' && $entry != '..' && preg_match('/^db_(.*?)_\d{4}-\d{2}-\d{2}_\d{2}-\d{2}\.sql.gz$/', $entry, $matches) && is_file($tmp_backup_dir.'/'.$entry)) {
-
-									$tmp_db_name = $matches[1];
-									$tmp_database = $app->db->queryOneRecord("SELECT * FROM web_database WHERE server_id = ? AND parent_domain_id = ? AND database_name = ?", $conf['server_id'], $tmp_web_id, $tmp_db_name);
-
-									if(is_array($tmp_database) && !empty($tmp_database)){
-										if($tmp_database['backup_interval'] == 'none' || intval($tmp_database['backup_copies']) == 0){
-											@unlink($tmp_backup_dir.'/'.$entry);
-											$sql = "DELETE FROM web_backup WHERE server_id = ? AND parent_domain_id = ? AND filename = ?";
-											$app->db->query($sql, $conf['server_id'], $tmp_web_id, $entry);
-											if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $tmp_web_id, $entry);
-										}
-									} else {
-										@unlink($tmp_backup_dir.'/'.$entry);
-										$sql = "DELETE FROM web_backup WHERE server_id = ? AND parent_domain_id = ? AND filename = ?";
-										$app->db->query($sql, $conf['server_id'], $tmp_web_id, $entry);
-										if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $tmp_web_id, $entry);
-									}
-								}
-							}
-							$dir_handle->close();
-						}
-					}
-				}
-				//* end run_backups
-				if( $server_config['backup_dir_is_mount'] == 'y' ) $app->system->umount_backup_dir($backup_dir);
-			} 
-		}
-		
-		// delete files from backup download dir (/var/www/example.com/backup)
-		unset($records, $entry, $files);
-		$sql = "SELECT * FROM web_domain WHERE server_id = ? AND (type = 'vhost' OR type = 'vhostsubdomain' OR type = 'vhostalias') AND active = 'y'";
-		$records = $app->db->queryAllRecords($sql, $conf['server_id']);
-		if(is_array($records)) {
-			foreach($records as $rec) {
-				$backup_download_dir = $rec['document_root'].'/backup';
-				if(is_dir($backup_download_dir)){
-					$dir_handle = dir($backup_download_dir);
-					$files = array();
-					while (false !== ($entry = $dir_handle->read())) {
-						if($entry != '.' && $entry != '..' && is_file($backup_download_dir.'/'.$entry)) {
-							// delete files older than 3 days
-							if(time() - filemtime($backup_download_dir.'/'.$entry) >= 60*60*24*3) @unlink($backup_download_dir.'/'.$entry);
-						}
-					}
-					$dir_handle->close();
-				}
-			}
-		}
-
+		$app->load("backup");
+		backup::run_all_backups($conf['server_id'], "auto");
 		parent::onRunJob();
 	}
 
diff --git a/server/plugins-available/backup_plugin.inc.php b/server/plugins-available/backup_plugin.inc.php
index 3308289d41..607491216d 100644
--- a/server/plugins-available/backup_plugin.inc.php
+++ b/server/plugins-available/backup_plugin.inc.php
@@ -54,6 +54,8 @@ class backup_plugin {
 		$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_web_files', $this->plugin_name, 'make_backup_callback');
+		$app->plugins->registerAction('backup_database', $this->plugin_name, 'make_backup_callback');
 		//$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');
@@ -69,6 +71,7 @@ class backup_plugin {
 		if(is_array($backup)) {
 
 			$app->uses('ini_parser,file,getconf,system');
+			$app->load("backup");
 
 			$web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $backup['parent_domain_id']);
 			$server_config = $app->getconf->get_server_config($conf['server_id'], 'server');
@@ -78,7 +81,8 @@ class backup_plugin {
 			
 			$backup_dir_is_ready = true;
             //* mount backup directory, if necessary
-            if( $server_config['backup_dir_is_mount'] == 'y' && !$app->system->mount_backup_dir($server_config['backup_dir']) ) $backup_dir_is_ready = false;
+			if (!backup::mount_backup_dir($conf['server_id']))
+				$backup_dir_is_ready = false;
 
 			if($backup_dir_is_ready){
 				//* Make backup available for download
@@ -121,47 +125,12 @@ class backup_plugin {
 
 				//* Restore a mysql backup
 				if($action_name == 'backup_restore' && $backup['backup_type'] == 'mysql') {
-					//* Load sql dump into db
-					include 'lib/mysql_clientdb.conf';
-
-					if(file_exists($backup_dir.'/'.$backup['filename'])) {
-						//$parts = explode('_',$backup['filename']);
-						//$db_name = $parts[1];
-						preg_match('@^db_(.+)_\d{4}-\d{2}-\d{2}_\d{2}-\d{2}\.sql\.gz$@', $backup['filename'], $matches);
-						$db_name = $matches[1];
-						$command = "gunzip --stdout ? | mysql -h ? -u ? -p? ?";
-						$app->system->exec_safe($command, $backup_dir.'/'.$backup['filename'], $clientdb_host, $clientdb_user, $clientdb_password, $db_name);
-					}
-					unset($clientdb_host);
-					unset($clientdb_user);
-					unset($clientdb_password);
-					$app->log('Restored MySQL backup '.$backup_dir.'/'.$backup['filename'], LOGLEVEL_DEBUG);
+					backup::restoreBackupDatabase($backup['backup_format'], trim($backup['backup_password']), $backup_dir, $backup['filename'], $backup['backup_mode'], $backup['backup_type']);
 				}
 
 				//* Restore a web backup
 				if($action_name == 'backup_restore' && $backup['backup_type'] == 'web') {
-					$app->system->web_folder_protection($web['document_root'], false);
-					if($backup['backup_mode'] == 'userzip') {
-						if(file_exists($backup_dir.'/'.$backup['filename']) && $web['document_root'] != '' && $web['document_root'] != '/' && !stristr($backup_dir.'/'.$backup['filename'], '..') && !stristr($backup_dir.'/'.$backup['filename'], 'etc')) {
-							if(file_exists($web['document_root'].'/backup/'.$backup['filename'])) rename($web['document_root'].'/backup/'.$backup['filename'], $web['document_root'].'/backup/'.$backup['filename'].'.bak');
-							copy($backup_dir.'/'.$backup['filename'], $web['document_root'].'/backup/'.$backup['filename']);
-							chgrp($web['document_root'].'/backup/'.$backup['filename'], $web['system_group']);
-							//chown($web['document_root'].'/backup/'.$backup['filename'],$web['system_user']);
-							$command = 'sudo -u ? unzip -qq -o ? -d ? 2> /dev/null';
-							$app->system->exec_safe($command, $web['system_user'], $web['document_root'].'/backup/'.$backup['filename'], $web['document_root']);
-							unlink($web['document_root'].'/backup/'.$backup['filename']);
-							if(file_exists($web['document_root'].'/backup/'.$backup['filename'].'.bak')) rename($web['document_root'].'/backup/'.$backup['filename'].'.bak', $web['document_root'].'/backup/'.$backup['filename']);
-							$app->log('Restored Web backup '.$backup_dir.'/'.$backup['filename'], LOGLEVEL_DEBUG);
-						}
-					}
-					if($backup['backup_mode'] == 'rootgz') {
-						if(file_exists($backup_dir.'/'.$backup['filename']) && $web['document_root'] != '' && $web['document_root'] != '/' && !stristr($backup_dir.'/'.$backup['filename'], '..') && !stristr($backup_dir.'/'.$backup['filename'], 'etc')) {
-							$command = 'tar xzf ? --directory ?';
-							$app->system->exec_safe($command, $backup_dir.'/'.$backup['filename'], $web['document_root']);
-							$app->log('Restored Web backup '.$backup_dir.'/'.$backup['filename'], LOGLEVEL_DEBUG);
-						}
-					}
-					$app->system->web_folder_protection($web['document_root'], true);
+					backup::restoreBackupWebFiles($backup['backup_format'], trim($backup['backup_password']), $backup_dir, $backup['filename'], $backup['backup_mode'], $backup['backup_type'], $web['document_root'], $web['system_user'], $web['system_group']);
 				}
 				
 				if($action_name == 'backup_delete') {
@@ -175,7 +144,7 @@ class backup_plugin {
 					}
 				}
 
-				if( $server_config['backup_dir_is_mount'] == 'y' ) $app->system->umount_backup_dir($backup_dir);
+				backup::unmount_backup_dir($conf['server_id']);
 			} else {
 				$app->log('Backup directory not ready.', LOGLEVEL_DEBUG);
 			}
@@ -186,6 +155,37 @@ class backup_plugin {
 		return 'ok';
 	}
 
+	/**
+	 * Makes a backup of website files or database, it's triggered by action and required for the plugin to work.
+	 * Please, don't call this function directly unless you know what you're doing.
+	 * @param string $action_name is the backup source: web files or database
+	 * @param string|int $domain_id
+	 * @return string
+	 * @author Ramil Valitov <ramilvalitov@gmail.com>
+	 * @uses backup_plugin::run_backup() recommended to use if you need to make backups
+	 */
+	public function make_backup_callback($action_name, $domain_id)
+	{
+		global $app;
+
+		//Load backup class
+		$app->load('backup');
+		$app->log('Triggered backup routine for domain id ' . $domain_id . ', action name ' . $action_name, LOGLEVEL_DEBUG);
+
+		switch ($action_name) {
+			case 'backup_web_files':
+				backup::run_backup($domain_id, 'web', "manual");
+				break;
+			case 'backup_database':
+				backup::run_backup($domain_id, 'mysql', "manual");
+				break;
+			default:
+				$app->log('Unknown backup action name: ' . $action_name, LOGLEVEL_ERROR);
+				break;
+		}
+		return 'ok';
+	}
+
 	//* Restore a mail backup - florian@schaal-24.de
 	public function backup_action_mail($action_name, $data) {
 		global $app, $conf;
-- 
GitLab