Region Backup

From Osgrid Wiki
Jump to: navigation, search

Put the following into dailybackup.sh and run in cron once per day



cd /home/user/opensimdata/1-BACKUPS
mkdir $( date +%Y-%m-%d )
cd $( date +%Y-%m-%d )

mkdir opensim1
cd opensim1
mysqldump --user=osgrid --password=<passwordhere> opensim1 > opensim1.sql
cp /home/user/opensimdata/opensim1/bin/config-include/GridCommon.ini .
cp /home/user/opensimdata/opensim1/bin/config-include/FlotsamCache.ini .
cp /home/user/opensimdata/opensim1/bin/Regions/Regions.ini .
cp /home/user/opensimdata/opensim1/bin/OpenSim.ini .
cd ..
cd ..

tar jcvf $( date +%Y-%m-%d ).tbz2 $( date +%Y-%m-%d )
rm -rf $( date +%Y-%m-%d )