about summary refs log tree commit diff stats
path: root/core/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'core/scripts')
-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 ;;