Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Stop Canopy: 

    Code Block
    systemctl stop canopy canopy-celery


  2. If database structure is outdated or non-existent then configure a production DB: 

    Code Block
    canopy-manage setupdb --prod --drop-tables


  3. Delete data in DB: 

    Code Block
    canopy-manage flush


  4. Remove remaining remnants that are autogenerated: 

    Code Block
    echo -e 'truncate table django_prbac_role cascade;\ntruncate table django_content_type cascade;\n' | SKIP_PRBAC_CHECKS=1 canopy-manage dbshell


  5. Load db.json: 

    Code Block
    SKIP_PRBAC_CHECKS=1 canopy-manage loaddata db.json


  6. Extract Canopy files: 

    Code Block
    tar -xvf canopy_files.tgz -C /


  7. Set ownership of files: 

    Code Block
    chown -R canopy: /var/opt/checksec/canopy


  8. Start Canopy: 

    Code Block
    systemctl start canopy canopy-celery



If any issues are encounter with steps 3 or 4 then replace them with the following:

Code Block
Run: SKIP_PRBAC_CHECKS=1 canopy-manage shell_plus

Paste:
from django.apps import apps
for model in apps.get_models(): model.objects.all().delete()

ctrl-d to exit the shell