====================================
Update/Uninstall Anaconda Repository
====================================

Full support is included with your purchase of Anaconda Repository. 
If you have any questions during installation, please contact your sales representative 
or `Priority Support team <http://continuum.io/support>`_.


.. _repo-update:

Update Anaconda Repository
==========================

IMPORTANT: You MUST have a tested backup of your installation before starting the update process.

Your support representative will provide you with a download URL for the updated Anaconda Repository
installer.

Administrators can update to the latest Anaconda Repository release via the following commands::

  curl '$INSTALLER_URL' > anaconda_repository.sh
  anaconda_repository.sh -u
  anaconda-server-db-setup --execute
  supervisorctl stop all
  supervisorctl reload
  supervisorctl start all

Please contact your Priority Support provider or sales person if you have any questions or 
problems regarding the update.


Uninstall Anaconda Repository
=============================

Before deleting you may want to make a backup for security reasons. 
Refer to this site for suggestions on mongo backups: https://docs.mongodb.org/manual/reference/program/mongodump/

To delete Anaconda Repository, do the following:

1. Check the file storage path by running the following command::

    anaconda-server-config --get fs_storage_root

2. Delete the contents of /home/anaconda-server/repo: ``rm -rf /home/anaconda-server/repo``

3. Delete the appropriate MongoDB database (binstar).

4. Delete the contents of /etc/binstar: ``rm -rf /etc/binstar``

5. Delete the contents of the Anaconda Repository file storage path.


Update instructions for current and past versions
=================================================

Updating to 2.27::

    curl '$INSTALLER_URL' > anaconda_repository.sh
    anaconda_repository.sh -u
    anaconda-server-db-setup --execute
    supervisorctl stop all
    supervisorctl reload
    supervisorctl start all

Updating to 2.26.6, the logging configuration can be removed. Logs
have been moved to ``$PREFIX/var/log/anaconda-server/``::

    curl '$INSTALLER_URL' > anaconda_repository.sh
    anaconda_repository.sh -u
    anaconda-server-db-setup --execute
    anaconda-server-config --remove LOGGING
    supervisorctl stop all
    supervisorctl start all

Updating to 2.26::

    curl '$INSTALLER_URL' > anaconda_repository.sh
    anaconda_repository.sh -u
    anaconda-server-db-setup --execute
    supervisorctl stop all
    supervisorctl reload
    supervisorctl start all

To 2.25::

    curl '$INSTALLER_URL' > anaconda_repository.sh
    anaconda_repository.sh -u
    anaconda-server-db-setup --execute
    supervisorctl stop all
    supervisorctl reload
    supervisorctl start all

To 2.24::

    conda update binstar-server binstar-static anaconda-client
    anaconda-server-db-setup --execute
    anaconda-server-install-supervisord-config.sh
    supervisorctl stop all
    supervisorctl reload
    supervisorctl start all

To 2.23::

    conda update binstar-server binstar-static anaconda-client
    anaconda-server-db-setup --execute
    supervisorctl stop all
    supervisorctl reload
    supervisorctl start all

To 2.22::

    conda update binstar-server binstar-static anaconda-client
    anaconda-server-db-setup --execute
    supervisorctl stop all
    supervisorctl reload
    supervisorctl start all

To 2.21::

    conda update binstar-server binstar-static anaconda-client
    anaconda-server-db-setup --execute
    supervisorctl stop all
    supervisorctl reload
    supervisorctl start all

To 2.20::

    conda update binstar-server binstar-static anaconda-client
    anaconda-server-db-setup --execute
    supervisorctl stop all
    supervisorctl reload
    supervisorctl start all

To 2.19::

    conda update binstar-server anaconda-client anaconda-build
    anaconda-server-db-setup --execute
    supervisorctl stop all
    supervisorctl reload
    supervisorctl start all

To 2.18::

    conda update binstar-server anaconda-client anaconda-build
    anaconda-server-db-setup --execute
    supervisorctl stop
    supervisorctl reload
    supervisorctl start all

To 2.17::

    conda update binstar-server anaconda-client anaconda-build
    anaconda-server-db-setup --execute
    supervisorctl stop
    supervisorctl reload
    supervisorctl start all

To 2.16::

    conda update binstar-server anaconda-client anaconda-build
    anaconda-server-db-setup --execute
    supervisorctl restart all

To 2.15::

    conda update binstar-server anaconda-client anaconda-build
    anaconda-server-db-setup --execute
    supervisorctl restart all

To 2.14::

    conda update binstar-server anaconda-client anaconda-build
    anaconda-server-db-setup --execute
    supervisorctl restart all

To 2.13::

    conda update binstar-server anaconda-client anaconda-build
    anaconda-server-db-setup --execute
    anaconda-server-config --config-file /etc/binstar/config.yaml --set LABEL_NAME "'channel'"
    supervisorctl restart all

To 2.12::

    conda update binstar-server anaconda-client anaconda-build
    anaconda-server-db-setup --execute
    supervisorctl restart all

To 2.9::

    conda update binstar-static binstar-server cas-mirror
    anaconda-server-db-setup --execute
    supervisorctl restart all

To 2.8::

    conda update binstar-static binstar-server cas-mirror
    anaconda-server-db-setup --execute
    supervisorctl restart all

To 2.6.0::

    conda update binstar-server
    conda install cas-mirror

To 2.5.1::

    conda update binstar-server

To 2.3::

    conda update binstar-server
    conda install cas-mirror

To 2.2::

    conda update binstar-server
