Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Piotr Gawron
minerva-scripts
Commits
6552a108
Commit
6552a108
authored
Jun 08, 2018
by
Piotr Gawron
Browse files
backups for tomcat8 should work as well
parent
36d116c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/backup.sh
View file @
6552a108
#! /bin/bash
BACKUP_FILE
=
"/opt/backup/backup.tar.gz"
BACKUP_DIR
=
"/tmp/backup/"
CATALINA_HOME
=
"/var/lib/tomcat7"
rm
-f
$BACKUP_FILE
rm
-rdf
$BACKUP_DIR
mkdir
-p
$BACKUP_DIR
/tmp
CATALINA_HOME
=
"/var/lib/tomcat7"
cp
$CATALINA_HOME
/webapps/
*
.war
"
$BACKUP_DIR
/tmp"
2>/dev/null
if
[
-d
"
$CATALINA_HOME
/webapps/map_images"
]
then
cd
$CATALINA_HOME
/webapps/
tar
-zcf
$BACKUP_DIR
/tmp/map_images.tar.gz map_images
fi
CATALINA_HOME
=
"/var/lib/tomcat8"
cp
$CATALINA_HOME
/webapps/
*
.war
"
$BACKUP_DIR
/tmp"
2>/dev/null
if
[
-d
"
$CATALINA_HOME
/webapps/map_images"
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment