Cleanup Nix StoreΒΆ

Below is an example on how to cleanup nix store located at /opt/rhodecode. This can be also used to move RhodeCode to another machine keeping all the configuration options.

  1. Download installer from our website.

  2. Take not of your instances with versions when running rccontrol status:

    - NAME: enterprise-1
    - NAME: vcsserver-1
    
  3. Stop control/supervisor:

    rccontrol self-stop --force
    
  4. Remove and disable instances:

    sudo rm -rf /opt/rhodecode
    sudo rm -rf ~/.rccontrol/cache
    mv ~/.rccontrol/supervisor ~/.rccontrol/.supervisor
    mv ~/.rccontrol/enterprise-1 ~/.rccontrol/.enterprise-1
    mv ~/.rccontrol/vcsserver-1 ~/.rccontrol/.vcsserver-1
    
  5. Run installer again, and install control

  6. install VCSServer and Enterprise/Community again. Shortcut commands below to skip entering data:

    rccontrol install --accept-license VCSServer '{"host":"127.0.0.1", "port": 9999}'
    rccontrol install --accept-license Enterprise '{"password":"secret", "email":"sup@rt.com", "username":"adm", "host":"127.0.0.1", "port": 9919, "database":"sqlite", "repo_dir":"/tmp"}'
    
  7. Uninstall instances:

    rccontrol uninstall enterprise-1
    rccontrol uninstall vcsserver-1
    
  8. Move back instances to their original state:

    rccontrol self-stop --force
    rm -rf .rccontrol/supervisor
    mv .rccontrol/.supervisor .rccontrol/supervisor
    mv .rccontrol/.enterprise-1 .rccontrol/enterprise-1
    mv .rccontrol/.vcsserver-1 .rccontrol/vcsserver-1
    
  9. Restart control:

    rccontrol self-init