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:

    Note this may delete files in /var/opt/checksec/canopy/ if their respective objects are still in the DB 

    Code Block
    echo -e 'truncatefrom table django_prbac_role cascade;\ntruncate table django_content_type cascade;\ndjango.apps import apps\nfor model in apps.get_models(): model.objects.all().delete()' | SKIP_PRBAC_CHECKS=1 canopy-manage dbshellshell


  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:

...