"discourse: command not found" when trying to restore a backup from the command line

AI-generated summary

A user, shim, encountered an error “discourse: command not found” while trying to restore a backup from the command line. Canapin suggested running ./launcher enter app before using the discourse command, which solved the initial issue. However, shim then encountered another problem where they couldn’t rebuild due to being in readonly mode. They eventually found the solution in another post: Restore a backup from the command line, where they learned to exit the app by simply typing exit to run ./launcher rebuild app.

does this still work im getting this error discourse: command not found

Hello john :slight_smile:

Did you run ./launcher enter app before running the discourse command?

root@Canapin:~# cd /var/discourse/
root@Canapin:/var/discourse# ./launcher enter app
x86_64 arch detected.
root@Canapin-app:/var/www/discourse# discourse
Commands:
  discourse backup                            # Backup a discourse forum
  discourse disable_readonly                  # Disable the readonly mode
  discourse disable_restore                   # Forbid restore operations
  discourse enable_readonly                   # Enable the readonly mode
  discourse enable_restore                    # Allow restore operations
  discourse export                            # Backup a Discourse forum
  discourse export_categories                 # Export categories, all its to...
  discourse export_category                   # Export a category, all its to...
  discourse export_topics                     # Export topics and all users w...
  discourse help [COMMAND]                    # Describe available commands o...
  discourse import                            # Restore a Discourse backup
  discourse import_category                   # Import a category, its topics...
  discourse import_topics                     # Import topics and their users...
  discourse remap [--global,--regex] FROM TO  # Remap a string sequence acros...
  discourse request_refresh                   # Ask all clients to refresh th...
  discourse restore                           # Restore a Discourse backup
  discourse rollback                          # Rollback to the previous work...

this really helped me solve all my issues .

Now I have an issue I cant rebuild it.. how can I exit? to be able to run ./launcher rebuild app

i found my solution in the post above, exit