Skip to content

Commit 2280bd5

Browse files
committed
lighter backup procedure
1 parent 217c981 commit 2280bd5

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

install/vst-install.sh

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -306,28 +306,19 @@ fi
306306
# Backup nginx
307307
service nginx stop > /dev/null 2>&1
308308
if [ -e '/etc/nginx/nginx.conf' ]; then
309-
cp /etc/nginx/nginx.conf $vst_backups/nginx/
309+
cp /etc/nginx/* $vst_backups/nginx/
310310
fi
311-
if [ -f '/etc/nginx/conf.d/default.conf' ]; then
312-
cp /etc/nginx/conf.d/default.conf $vst_backups/nginx/
313-
fi
314-
if [ -e '/etc/nginx/conf.d/example_ssl.conf' ]; then
315-
cp /etc/nginx/conf.d/example_ssl.conf $vst_backups/nginx/
316-
fi
317-
if [ -e '/etc/nginx/conf.d/vesta_ip.conf' ]; then
318-
mv /etc/nginx/conf.d/vesta_ip.conf $vst_backups/nginx
311+
if [ -f '/etc/nginx/conf.d' ]; then
312+
cp -r /etc/nginx/conf.d $vst_backups/nginx/
319313
fi
320314

321315
# Backup httpd
322316
service httpd stop > /dev/null 2>&1
323317
if [ -e '/etc/httpd/conf/httpd.conf' ]; then
324318
cp /etc/httpd/conf/httpd.conf $vst_backups/httpd/
325319
fi
326-
if [ -e '/etc/httpd/conf.d/ssl.conf' ]; then
327-
cp /etc/httpd/conf.d/ssl.conf $vst_backups/httpd/
328-
fi
329-
if [ -e '/etc/httpd/conf.d/proxy_ajp.conf' ]; then
330-
cp /etc/httpd/conf.d/proxy_ajp.conf $vst_backups/httpd/
320+
if [ -e '/etc/httpd/conf.d' ]; then
321+
cp -r /etc/httpd/conf.d $vst_backups/httpd/
331322
fi
332323

333324
# Backup bind
@@ -398,6 +389,7 @@ if [ -e '/home/admin/conf/' ]; then
398389
mv /home/admin/conf/ $vst_backups/vesta/admin
399390
fi
400391

392+
401393
#----------------------------------------------------------#
402394
# Install packages #
403395
#----------------------------------------------------------#

0 commit comments

Comments
 (0)