Skip to content

Commit fe5f535

Browse files
committed
- It is now possible to exclude directories - on a per-vHost base - from website backups.
1 parent d04604a commit fe5f535

File tree

12 files changed

+65
-3
lines changed

12 files changed

+65
-3
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE `web_domain` ADD `backup_excludes` MEDIUMTEXT NULL AFTER `backup_copies` ;

install/sql/ispconfig3.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1796,6 +1796,7 @@ CREATE TABLE `web_domain` (
17961796
`custom_php_ini` mediumtext,
17971797
`backup_interval` VARCHAR( 255 ) NOT NULL DEFAULT 'none',
17981798
`backup_copies` INT NOT NULL DEFAULT '1',
1799+
`backup_excludes` mediumtext,
17991800
`active` enum('n','y') NOT NULL default 'y',
18001801
`traffic_quota_lock` enum('n','y') NOT NULL default 'n',
18011802
`fastcgi_php_version` varchar(255) DEFAULT NULL,

interface/web/sites/form/web_domain.tform.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,18 @@
520520
'default' => '',
521521
'value' => array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10')
522522
),
523+
'backup_excludes' => array (
524+
'datatype' => 'VARCHAR',
525+
'validators' => array ( 0 => array ( 'type' => 'REGEX',
526+
'regex' => '@^(?!.*\.\.)[-a-zA-Z0-9_/.~,]*$@',
527+
'errmsg'=> 'backup_excludes_error_regex'),
528+
),
529+
'formtype' => 'TEXT',
530+
'default' => '',
531+
'value' => '',
532+
'width' => '30',
533+
'maxlength' => '255'
534+
),
523535
//#################################
524536
// ENDE Datatable fields
525537
//#################################

interface/web/sites/form/web_vhost_subdomain.tform.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,18 @@
510510
'default' => '',
511511
'value' => array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10')
512512
),
513+
'backup_excludes' => array (
514+
'datatype' => 'VARCHAR',
515+
'validators' => array ( 0 => array ( 'type' => 'REGEX',
516+
'regex' => '@^(?!.*\.\.)[-a-zA-Z0-9_/.~,]*$@',
517+
'errmsg'=> 'backup_excludes_error_regex'),
518+
),
519+
'formtype' => 'TEXT',
520+
'default' => '',
521+
'value' => '',
522+
'width' => '30',
523+
'maxlength' => '255'
524+
),
513525
//#################################
514526
// ENDE Datatable fields
515527
//#################################

interface/web/sites/lib/lang/de_web_domain.lng

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,4 +121,9 @@ $wb['invalid_rewrite_rules_txt'] = 'Unzulässige Rewrite Rules';
121121
$wb['allowed_rewrite_rule_directives_txt'] = 'Erlaubte Direktiven:';
122122
$wb['configuration_error_txt'] = 'KONFIGURATIONSFEHLER';
123123
$wb['variables_txt'] = 'Variablen';
124+
$wb['added_by_txt'] = 'Hinzugefügt von';
125+
$wb['added_date_txt'] = 'Hinzugefügt am';
126+
$wb['backup_excludes_txt'] = 'Auszuschließende Verzeichnisse';
127+
$wb['backup_excludes_note_txt'] = '(Mehrere Verzeichnisse mit Kommas trennen)';
128+
$wb['backup_excludes_error_regex'] = 'Die auszuschließenden Verzeichnisse enthalten ungültige Zeichen.';
124129
?>

interface/web/sites/lib/lang/de_web_vhost_subdomain.lng

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,8 @@ $wb['rewrite_rules_txt'] = 'Rewrite Rules';
119119
$wb['invalid_rewrite_rules_txt'] = 'Unzulässige Rewrite Rules';
120120
$wb['allowed_rewrite_rule_directives_txt'] = 'Erlaubte Direktiven:';
121121
$wb['configuration_error_txt'] = 'KONFIGURATIONSFEHLER';
122+
$wb['variables_txt'] = 'Variablen';
123+
$wb['backup_excludes_txt'] = 'Auszuschließende Verzeichnisse';
124+
$wb['backup_excludes_note_txt'] = '(Mehrere Verzeichnisse mit Kommas trennen)';
125+
$wb['backup_excludes_error_regex'] = 'Die auszuschließenden Verzeichnisse enthalten ungültige Zeichen.';
122126
?>

interface/web/sites/lib/lang/en_web_domain.lng

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,7 @@ $wb['configuration_error_txt'] = "CONFIGURATION ERROR";
123123
$wb['variables_txt'] = 'Variables';
124124
$wb['added_by_txt'] = 'Added by';
125125
$wb['added_date_txt'] = 'Added date';
126+
$wb['backup_excludes_txt'] = 'Excluded Directories';
127+
$wb['backup_excludes_note_txt'] = '(Separate multiple directories with commas)';
128+
$wb['backup_excludes_error_regex'] = 'The excluded directories contain invalid characters.';
126129
?>

interface/web/sites/lib/lang/en_web_vhost_subdomain.lng

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,8 @@ $wb['rewrite_rules_txt'] = 'Rewrite Rules';
120120
$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
121121
$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
122122
$wb['configuration_error_txt'] = "CONFIGURATION ERROR";
123+
$wb['variables_txt'] = 'Variables';
124+
$wb['backup_excludes_txt'] = 'Auszuschließende Verzeichnisse';
125+
$wb['backup_excludes_note_txt'] = '(Mehrere Verzeichnisse mit Kommas trennen)';
126+
$wb['backup_excludes_error_regex'] = 'Die auszuschließenden Verzeichnisse enthalten ungültige Zeichen.';
123127
?>

interface/web/sites/templates/web_domain_backup.htm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ <h2><tmpl_var name="list_head_txt"></h2>
2525
<select name="backup_copies" id="backup_copies" class="selectInput">
2626
{tmpl_var name='backup_copies'}
2727
</select>
28+
</div>
29+
<div class="ctrlHolder">
30+
<label for="backup_excludes">{tmpl_var name='backup_excludes_txt'}</label>
31+
<input name="backup_excludes" id="backup_excludes" value="{tmpl_var name='backup_excludes'}" size="30" type="text" class="textInput" />&nbsp;{tmpl_var name='backup_excludes_note_txt'}
2832
</div>
2933
</fieldset>
3034

interface/web/sites/templates/web_vhost_subdomain_advanced.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ <h2><tmpl_var name="list_head_txt"></h2>
7575
</div>
7676
<div class="ctrlHolder nginx">
7777
<label for="nginx_directives">{tmpl_var name='nginx_directives_txt'}</label>
78-
<textarea name="nginx_directives" id="nginx_directives" rows='10' cols='50' style="width:400px;">{tmpl_var name='nginx_directives'}</textarea>&nbsp;<b>{tmpl_var name="available_nginx_directive_snippets_txt"}</b><br><br>&nbsp;{tmpl_var name="nginx_directive_snippets_txt"}
78+
<textarea name="nginx_directives" id="nginx_directives" rows='10' cols='50' style="width:400px;">{tmpl_var name='nginx_directives'}</textarea>&nbsp;<b>{tmpl_var name="available_nginx_directive_snippets_txt"}</b><br><br>&nbsp;{tmpl_var name="nginx_directive_snippets_txt"}<br>----<br><b>&nbsp;{tmpl_var name='variables_txt'}:</b> <a href="javascript:void(0);" class="addPlaceholder">{DOCROOT}</a>, <a href="javascript:void(0);" class="addPlaceholder">{FASTCGIPASS}</a>
7979
</div>
8080
<div class="ctrlHolder proxy">
8181
<label for="proxy_directives">{tmpl_var name='proxy_directives_txt'}</label>

0 commit comments

Comments
 (0)