generated from aboutcode-org/skeleton
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #460 from nexB/update-docs
Update docs
- Loading branch information
Showing
4 changed files
with
347 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,6 @@ through specific use cases: | |
:maxdepth: 2 | ||
|
||
installation | ||
tasks | ||
matchcode | ||
tutorial_symbol_and_string_collection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
Tasks | ||
===== | ||
|
||
These are a collection of common tasks that are done when running PurlDB. | ||
|
||
|
||
Create a PurlDB API key | ||
----------------------- | ||
|
||
.. code-block:: console | ||
docker compose exec web purldb create-user <user_name> | ||
Create a PurlDB Package scan worker API key | ||
------------------------------------------- | ||
|
||
.. code-block:: console | ||
docker compose exec web purldb create-scan-queue-worker-user <scan_worker_user_name> | ||
Backup PurlDB database | ||
---------------------- | ||
|
||
.. code-block:: console | ||
docker compose exec db pg_dump -U packagedb -Fc packagedb > /path/to/backup.dump | ||
Restore PurlDB database from backup | ||
----------------------------------- | ||
|
||
1. Stop all containers and restart ``db``. | ||
|
||
.. code-block:: console | ||
docker compose stop | ||
docker compose up --detatch db | ||
2. Drop current PurlDB database. | ||
|
||
.. code-block:: console | ||
docker compose exec db dropdb -U packagedb packagedb | ||
3. Recreate PurlDB database. | ||
|
||
.. code-block:: console | ||
TEMPLATE=template0 ENCODING='UTF8' LC_COLLATE='en_US.utf8' LC_CTYPE='en_US.utf8' docker compose exec db createdb --password -U packagedb packagedb | ||
4. Copy PurlDB database backup and restore it. | ||
|
||
.. code-block:: console | ||
docker cp <path to backup.dump> purldb-db-1:/tmp | ||
docker compose exec db bash | ||
pg_restore --verbose -U packagedb -d packagedb /tmp/backup.dump |
Oops, something went wrong.