Answer the question
In order to leave comments, you need to log in
[[+content_image]]
What do these options mean in a BASH script?
There is the following script:
!/bin/bash
set -e
echo "Application backuping... "
BACKUPS_ROOT=/var/www/homework/backups/restore-backup_$(date '+%d-%m-%Y').sh
if [[ ! -d $BACKUPS_ROOT ]];
then
echo "Creating backup directory..."
mkdir -p "$BACKUPS_ROOT"
fi
# TODO: make database dump
touch dump.sql
gzip --best dump.sql
mv dump.sql.gz "$BACKUPS_ROOT"
zip -9 -qj uploads.zip backend/web/uploads/*
mv uploads.zip "$BACKUPS_ROOT"
echo "Backup is ready!"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question