Browse Source

Merge pull request #1658 from hestiacp/fix/1655-restore-user-files

Disable changing backup folder #1655
Raphael Schneeberger 5 years ago
parent
commit
3f5ed5a041

+ 1 - 0
CHANGELOG.md

@@ -40,6 +40,7 @@ All notable changes to this project will be documented in this file.
 - Fixed an issue which doesnt save the mysql wait_timeout due to wrong regexp attribute (thanks @guicapanema).
 - Improved subdoamin handling to prevent the ability of creating subdomains when the tld belongs to another account (thanks @KuJoe and @sickcodes).
 - Improved the IDN handling to remove the current issues with let's encrypt and mail.
+- Disabled changing backup folder via Web UI because it used symbolic link instead of mount causing issues with restore mail / user files 
 
 ## [1.3.3] - Service Release
 ### Bugfixes

+ 0 - 6
bin/v-change-sys-config-value

@@ -46,12 +46,6 @@ else
     sed -i "s|$key=.*|$key='$value'|g" $HESTIA/conf/hestia.conf
 fi
 
-if [ "$key" = "BACKUP" ] && [ "$value" != '/backup' ]; then
-    rm /backup
-    ln -s $value /backup
-fi
-
-
 #----------------------------------------------------------#
 #                       Hestia                             #
 #----------------------------------------------------------#

+ 3 - 0
web/edit/server/index.php

@@ -508,9 +508,12 @@ if (!empty($_POST['save'])) {
     // Change backup path
     if (empty($_SESSION['error_msg'])) {
         if ($_POST['v_backup_dir'] != $v_backup_dir ) {
+            /*
+            See #1655 
             exec (HESTIA_CMD."v-change-sys-config-value BACKUP ".escapeshellarg($_POST['v_backup_dir']), $output, $return_var);
             check_return_code($return_var,$output);
             unset($output);
+            */
             if (empty($_SESSION['error_msg'])) $v_backup_dir = $_POST['v_backup_dir'];
             $v_backup_adv = 'yes';
         }

+ 2 - 2
web/templates/admin/edit_server.html

@@ -719,12 +719,12 @@
                                         </tr>
                                         <tr>
                                             <td class="vst-text">
-                                                <?php print _('Directory') ?>
+                                                <?php print _('Directory') ?> <a href="https://docs.hestiacp.com/admin_docs/backups.html"><i class="fas fa-question-circle"></i></a>
                                             </td>
                                         </tr>
                                         <tr>
                                             <td>
-                                                <input type="text" size="20" class="vst-input" name="v_backup_dir" value="<?=trim($v_backup_dir, "'")?>">
+                                                <input type="text" size="20" class="vst-input" name="v_backup_dir" value="<?=trim($v_backup_dir, "'")?>" disabled="disabled">
                                                 <br><br>
                                             </td>
                                         </tr>