Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2381 from aiven/dorota-postgresql-cli-add-project…
Browse files Browse the repository at this point in the history
…-parameter

Add --project parameter for PG and MySQL CLI commands
  • Loading branch information
wojcik-dorota authored Dec 19, 2023
2 parents 61f9df2 + 79a63e7 commit 87f9041
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 19 deletions.
4 changes: 2 additions & 2 deletions docs/products/mysql/howto/do-check-service-migration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ You can create the task of migration, for example, from a MySQL DB to an Aiven s

.. code-block:: shell
avn service task-create --operation migration_check --source-service-uri mysql://user:password@host:port/databasename --project MY_PROJECT_NAME mysql
avn service task-create --project PROJECT_NAME --operation migration_check --source-service-uri mysql://user:password@host:port/databasename --project MY_PROJECT_NAME mysql
You can see the information about the task including the ID.

Expand All @@ -58,7 +58,7 @@ You can check the status of your task by running:

.. code::
avn service task-get --task-id e2df7736-66c5-4696-b6c9-d33a0fc4cbed --project MY_PROJECT_NAME mysql
avn service task-get --project PROJECT_NAME --task-id e2df7736-66c5-4696-b6c9-d33a0fc4cbed --project MY_PROJECT_NAME mysql
You can find whether the operation succeeds and more relevant information about the migration.

Expand Down
6 changes: 3 additions & 3 deletions docs/products/mysql/howto/migrate-from-external-mysql.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Perform the migration

3. Set the migration details via the ``avn service update`` :ref:`Aiven CLI command <avn-cli-service-update>` substituting the parameters accordingly::

avn service update \
avn service update --project PROJECT_NAME \
-c migration.host=SRC_HOSTNAME \
-c migration.port=SRC_PORT \
-c migration.username=SRC_USERNAME \
Expand All @@ -76,7 +76,7 @@ Perform the migration

.. code::
avn --show-http service migration-status DEST_NAME
avn --show-http service migration-status --project PROJECT_NAME DEST_NAME
Whilst the migration process is ongoing, the ``migration_detail.status`` will be ``syncing``:

Expand Down Expand Up @@ -112,5 +112,5 @@ If you reach a point where you no longer need the ongoing replication to happen,

.. code::
avn service update --remove-option migration DEST_NAME
avn service update --project PROJECT_NAME --remove-option migration DEST_NAME
2 changes: 1 addition & 1 deletion docs/products/postgresql/howto/enable-jit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ To enable JIT via :doc:`Aiven CLI </docs/tools/cli>`, you can use the :ref:`serv

.. code::
avn service update -c pg.jit=true PG_SERVICE_NAME
avn service update --project PROJECT_NAME -c pg.jit=true PG_SERVICE_NAME
Enable JIT for a specific database
----------------------------------
Expand Down
21 changes: 10 additions & 11 deletions docs/products/postgresql/howto/migrate-aiven-db-migrate.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ In order to use the **logical replication** method, you'll need the following:

.. code::
avn service create -t pg -p DEST_PG_PLAN DEST_PG_NAME
avn service create --project PROJECT_NAME -t pg -p DEST_PG_PLAN DEST_PG_NAME
2. Enable the ``aiven_extras`` extension in the Aiven for PostgreSQL® target database as written in the :ref:`dedicated document <aiven_extras_extension>`.

Expand Down Expand Up @@ -93,13 +93,13 @@ You can initiate a migration to an Aiven for PostgreSQL® service with the :doc:

.. code:: bash
avn service update -c migration.host=SRC_HOSTNAME \
-c migration.port=SRC_PORT \
-c migration.ssl=true \
-c migration.username=SRC_USERNAME \
-c migration.password=SRC_PASSWORD \
-c migration.dbname=DST_DBNAME \
-c migration.ignore_dbs=DB_TO_SKIP \
avn service update --project PROJECT_NAME -c migration.host=SRC_HOSTNAME \
-c migration.port=SRC_PORT \
-c migration.ssl=true \
-c migration.username=SRC_USERNAME \
-c migration.password=SRC_PASSWORD \
-c migration.dbname=DST_DBNAME \
-c migration.ignore_dbs=DB_TO_SKIP \
DEST_PG_NAME
.. Note::
Expand All @@ -113,10 +113,9 @@ You can check the migration status using the :doc:`Aiven CLI </docs/tools/cli>`

.. code:: bash
avn --show-http service migration-status \
avn --project PROJECT_NAME --show-http service migration-status \
DEST_PG_NAME
.. Note::

There may be delay for migration status to update the current progress, keep running this command to see the most up-to-date status.
Expand Down Expand Up @@ -176,7 +175,7 @@ The migration process can be stopped with:

.. code:: bash
avn service update --remove-option migration DEST_PG_NAME
avn service update --project PROJECT_NAME --remove-option migration DEST_PG_NAME
The above command removes all logical replication-related objects from both source and destination cluster.
Expand Down
2 changes: 1 addition & 1 deletion docs/products/postgresql/howto/migrate-pg-dump-restore.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Perform the migration

.. code::
avn service create -t pg -p DEST_PG_PLAN DEST_PG_NAME
avn service create --project PROJECT_NAME -t pg -p DEST_PG_PLAN DEST_PG_NAME
.. Tip::

Expand Down
2 changes: 1 addition & 1 deletion docs/products/postgresql/howto/pgbouncer-stats.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Execute the following command replacing the ``INSTANCE_NAME`` parameter with the

.. code::
avn service get INSTANCE_NAME --json | jq -r '.connection_info.pgbouncer'
avn service get INSTANCE_NAME --project PROJECT_NAME --json | jq -r '.connection_info.pgbouncer'
The output will be similar to the below:

Expand Down

0 comments on commit 87f9041

Please sign in to comment.