A new system is in place which will allow you to update the BETY database without losing any local changes (this is still BETA though). See the section [Distributed instances of BETYdb] for details on updating a local database in a way that retains any local changes.
If you are a BETYdb Ruby-on-Rails developer, you probably don't care about losing changes to your copy of the BETY database. You probably just want a reasonably up-to-date copy that you can use to test code changes with. If so, you may use the script
update-betydb.sh in the
script directory. This is just a wrapper for
load.bety.sh script that makes it easy to download that script (without having to download all of Pecan) and easy to run it with the options you probably want. Step for doing this are:
script/update-bety.sh without options to download a copy of
script/update-bety.sh -i to write a stock configuration file. This file will contain the following settings:
export DATABASE=bety # update database "bety"; change this name as neededexport CREATE=YES # completely overwrite the database you are updating with new contentexport FIXSEQUENCE=YES # needed for the CREATE optionexport USERS=YES # create a stock set of users of various permission levels to use when testing
DO NOT RUN THIS IF YOU HAVE DATA IN YOUR DATABASE!!!!!!!!!!!
The CREATE=YES WILL destroy all data in your database
script/update-bety.sh again with no options. This will read the config file you just created and use the settings to update your database copy.
If you have an instance of BETY and you might want to update it to the latest version at certain points for the following reasons.
importing data and remote server has newer version
To update BETY you can use the following steps to update your system (this is assuming the VM, if you installed BETY in another location please change the path accordingly). This requires the development version of ruby.
sudo -s# change to BETYcd /usr/local/bety# update BETY to latest versiongit pull# install all required gemsbundle install --without test# update databaseRAILS_ENV="production" rake db:migrate# restart BETYtouch tmp/restart.txt
At this point your database should have migrated to the latest version and the BETY application should have restarted.
See the section of Updating BETY database above that pertains to BETYdb Ruby-on-Rails developers.