Update functions
This commit is contained in:
parent
aa8f6aadd5
commit
7667b98d05
1 changed files with 1 additions and 8 deletions
|
@ -40,14 +40,7 @@ function backup_dir_create () {
|
||||||
|
|
||||||
function backup_files () {
|
function backup_files () {
|
||||||
echo "creating file backup..."
|
echo "creating file backup..."
|
||||||
SRC="${ZAMMAD_DIR}"
|
tar -C / -czf ${BACKUP_DIR}/${TIMESTAMP}_zammad_files.tar.gz ${ZAMMAD_DIR#/}
|
||||||
ARGS=""
|
|
||||||
# remove leading "/" to suppress the tar warning
|
|
||||||
if [[ "${ZAMMAD_DIR}" =~ ^/ ]]; then
|
|
||||||
SRC="${ZAMMAD_DIR:1}"
|
|
||||||
ARGS="-C /"
|
|
||||||
fi
|
|
||||||
tar ${ARGS} -czf ${BACKUP_DIR}/${TIMESTAMP}_zammad_files.tar.gz ${SRC}
|
|
||||||
ln -sfn ${BACKUP_DIR}/${TIMESTAMP}_zammad_files.tar.gz ${BACKUP_DIR}/latest_zammad_files.tar.gz
|
ln -sfn ${BACKUP_DIR}/${TIMESTAMP}_zammad_files.tar.gz ${BACKUP_DIR}/latest_zammad_files.tar.gz
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue