Browse Source

Backup config

Ernesto Nicolás Carrea 5 years ago
parent
commit
3001527fd2
1 changed files with 3 additions and 2 deletions
  1. 3 2
      bin/module/func.inc

+ 3 - 2
bin/module/func.inc

@@ -27,9 +27,10 @@ hestia_module_getvariant() {
 
 # Backup config files (usually prior to module install)
 hestia_config_backup() {
-    dest=$HESTIA/data/backups/$1
+    dest=$HESTIA/data/backup/
+    filename=${1}-$(date +%Y%m%d%H%M%S)
     shift
 
     mkdir -p $dest
-    cp -f $@ $dest
+    tar -zcf ${filename}.tar.gz $@
 }