host info updates
[distro-setup] / bk-backup
index 24fa10590f61b05ba9e1bc3372c6d29f3b051d0c..e47576669945141456d3600853ffd5410c2f7a78 100755 (executable)
--- a/bk-backup
+++ b/bk-backup
@@ -1,4 +1,25 @@
 #!/bin/bash
+# I, Ian Kelling, follow the GNU license recommendations at
+# https://www.gnu.org/licenses/license-recommendations.en.html. They
+# recommend that small programs, < 300 lines, be licensed under the
+# Apache License 2.0. This file contains or is part of one or more small
+# programs. If a small program grows beyond 300 lines, I plan to switch
+# its license to GPL.
+
+# Copyright 2024 Ian Kelling
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+#     http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 
 # usage: $0 [restore]
 
@@ -41,7 +62,7 @@ if $restore; then
 fi
 
 ret=0
-if [[ $HOSTNAME == $MAIL_HOST ]]; then
+if [[ $HOSTNAME == "$MAIL_HOST" ]]; then
   mkdir -p /p/bkbackup
   for ncdir in /var/www/ncexpertpath /var/www/ncninja; do
     ncbase=${ncdir##*/}
@@ -54,6 +75,9 @@ if [[ $HOSTNAME == $MAIL_HOST ]]; then
       ret=1
     fi
   done
-  rsync --numeric-ids -ra --delete root@$host:/m /p/bkbackup
+  rsync --numeric-ids -ra --delete \
+        --exclude md/expertpathologyreview.com/testignore \
+        --exclude md/amnimal.ninja/testignore \
+        root@$host:/m /p/bkbackup
 fi
 exit $ret