X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fopensim%2Fbackup_osgrid.sh;h=15e5dbc3043a5880b65be17a410a4dea807ccf8d;hb=46198a8a6081484e0e452a3a47c8bec10f254487;hp=4e14399a91d43f9eec87690fc995bc0ba48c42ba;hpb=11e25956510fbe953a9ceeaddbaebd80334abf43;p=feisty_meow.git diff --git a/scripts/opensim/backup_osgrid.sh b/scripts/opensim/backup_osgrid.sh index 4e14399a..15e5dbc3 100644 --- a/scripts/opensim/backup_osgrid.sh +++ b/scripts/opensim/backup_osgrid.sh @@ -1,13 +1,15 @@ #!/bin/bash # a simple script that backs up the opensim database assets. +source "$FEISTY_MEOW_SCRIPTS/core/functions.sh" + host=$(echo $(hostname) | sed -e 's/\([^.]*\)\..*/\1/') -bkupname=osgrid_bkup_${host}_$(date_stringer).mysql_bkup -mysqldump -u griduser -p$(cat $HOME/.secrets/opensim_db_password.txt) opengrid > $bkupname +bkupname="osgrid_bkup_${host}_$(date_stringer).mysql_bkup" +mysqldump -u griduser -p$(cat $HOME/.secrets/opensim_db_password.txt) opengrid > "$bkupname" # note that the above assumes the database is called "opensim". it might be # called opengrid instead, based on the setup procedure that was followed. # likewise the user might be someone other than "griduser". -gzip $bkupname +gzip "$bkupname"