aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilvino Silva <silvino@bk.ru>2018-07-17 15:29:02 +0100
committerSilvino Silva <silvino@bk.ru>2018-07-17 15:29:02 +0100
commit6eacde73690fab3ce6e34fb99034e8f2917a1164 (patch)
tree19247384c82a5e95080c6920e74b90d1cf25d417
parentbdea1c23d13c417a00b71654670aed309cfa302a (diff)
downloaddoc-6eacde73690fab3ce6e34fb99034e8f2917a1164.tar.gz
better comments backup-system
-rw-r--r--core/scripts/backup-system.sh16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/scripts/backup-system.sh b/core/scripts/backup-system.sh
index ba6a961..9e1ed2f 100644
--- a/core/scripts/backup-system.sh
+++ b/core/scripts/backup-system.sh
@@ -27,16 +27,20 @@ ConfirmOrExit ()
}
mkbk_coll_pkg() {
+ # backup binary packages per collection
col=$1
- # make copy of packages
+ # make backup collection directory
mkdir ${PORT_PKG}/${col}
+ # for each package listed in col_name.pkg
while read line; do
+ # if binary package don't exist try to build
if [ ! -f /usr/ports/packages/${line} ]; then
echo "Building package: ${line};\n"
name=$(echo ${line} | cut -d "#" -f 1)
- #$sudo prt-get update -fr ${name}
+ $sudo prt-get update -fr ${name}
fi
+ # if binary package exist copy to destination
if [ -f /usr/ports/packages/${line} ]; then
echo "Backing up package: ${line}"
echo ${line} >> ${DEST_DIR}/backup.pkg
@@ -49,18 +53,14 @@ mkbk_coll_pkg() {
}
mkbk_coll_ports() {
+ # backup collection ports
col=$1
- # tar --xattrs -zcpf $PORT_PRT/${col}-`date '+%Y-%j-%H-%M-%S'`.tar.gz \
- # --directory=$ROOT_DIR/usr/ports/${col} \
- # .
tar --xattrs -zcpf $PORT_PRT/${col}.tar.gz \
--directory=$ROOT_DIR/usr/ports/${col} \
--exclude=.git/ \
- .
}
-
mkbk_metadata() {
# archive pkgutils data
@@ -252,7 +252,7 @@ done
while true
do
- echo -n "Backup server data ? Please confirm (y or n) :"
+ echo -n "Backup web services data (/srv) ? Please confirm (y or n) :"
read CONFIRM
case $CONFIRM in
n|N|no|NO|No) break ;;