You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by rg...@apache.org on 2015/08/08 07:45:46 UTC
svn commit: r1694766 - /comdev/tools/scripts/backup.sh
Author: rgardler
Date: Sat Aug 8 05:45:46 2015
New Revision: 1694766
URL: http://svn.apache.org/r1694766
Log:
dos2unix
Modified:
comdev/tools/scripts/backup.sh
Modified: comdev/tools/scripts/backup.sh
URL: http://svn.apache.org/viewvc/comdev/tools/scripts/backup.sh?rev=1694766&r1=1694765&r2=1694766&view=diff
==============================================================================
--- comdev/tools/scripts/backup.sh (original)
+++ comdev/tools/scripts/backup.sh Sat Aug 8 05:45:46 2015
@@ -1,60 +1,60 @@
-echo "##################################################################################################"
-echo "# Backup the data on the selected machine 'dev', 'stage' or 'local'"
-echo "# 'dev' is typically a local machine used for development. Backups will be found in the mounted volume"
-echo "# 'stage' is typically a remote machine used for testing. Backups will be found in the container itself."
-echo "# 'local' is typically a remote machine used for production. Backups will be found in the container itself."
-echo "#"
-echo "# You can provide this value as an argument to this script"
-echo "##################################################################################################"
-
-source ./scripts/config.sh
-
-if [ -n "$1" ]; then
- type=$1
-else
- read -p "What kind of deployment do you want to backup (enter 'dev', 'stage', 'local') " type
-fi
-
-case $type in
- "dev")
- eval "$(docker-machine env $DEV_MACHINE_NAME)"
- ;;
- "stage")
- eval "$(docker-machine env $STAGE_MACHINE_NAME)"
- ;;
- "local")
- ;;
- *)
- echo "Unkown option, aborting"
- exit 255
- ;;
-esac
-
-echo "##################################################################################################"
-echo "# Dumping database to fixtures/backup_data.json"
-echo "##################################################################################################"
-docker exec meetups_app python manage.py dumpdata --format=json events_list > fixtures/backup_data.json
-
-echo "##################################################################################################"
-echo "# Copying file to backup local filesystem"
-echo "##################################################################################################"
-case $type in
- "local")
- ;;
- "other")
- docker-machine scp dev:/home/docker/comdev/meetups/fixtures/backup_data.json ./fixtures/backup_data.json
- ;;
-esac
-
-case $2 in
- "commit")
- svn commit fixtures/backup_data.json -m "Latest backup data"
- ;;
- "other")
- echo "All done, consider commiting this backup file to SVN"
- ;;
-esac
-
-
-
-
+echo "##################################################################################################"
+echo "# Backup the data on the selected machine 'dev', 'stage' or 'local'"
+echo "# 'dev' is typically a local machine used for development. Backups will be found in the mounted volume"
+echo "# 'stage' is typically a remote machine used for testing. Backups will be found in the container itself."
+echo "# 'local' is typically a remote machine used for production. Backups will be found in the container itself."
+echo "#"
+echo "# You can provide this value as an argument to this script"
+echo "##################################################################################################"
+
+source ./scripts/config.sh
+
+if [ -n "$1" ]; then
+ type=$1
+else
+ read -p "What kind of deployment do you want to backup (enter 'dev', 'stage', 'local') " type
+fi
+
+case $type in
+ "dev")
+ eval "$(docker-machine env $DEV_MACHINE_NAME)"
+ ;;
+ "stage")
+ eval "$(docker-machine env $STAGE_MACHINE_NAME)"
+ ;;
+ "local")
+ ;;
+ *)
+ echo "Unkown option, aborting"
+ exit 255
+ ;;
+esac
+
+echo "##################################################################################################"
+echo "# Dumping database to fixtures/backup_data.json"
+echo "##################################################################################################"
+docker exec meetups_app python manage.py dumpdata --format=json events_list > fixtures/backup_data.json
+
+echo "##################################################################################################"
+echo "# Copying file to backup local filesystem"
+echo "##################################################################################################"
+case $type in
+ "local")
+ ;;
+ "other")
+ docker-machine scp dev:/home/docker/comdev/meetups/fixtures/backup_data.json ./fixtures/backup_data.json
+ ;;
+esac
+
+case $2 in
+ "commit")
+ svn commit fixtures/backup_data.json -m "Latest backup data"
+ ;;
+ "other")
+ echo "All done, consider commiting this backup file to SVN"
+ ;;
+esac
+
+
+
+