mirror of
https://github.com/matter-labs/ansible-en-role.git
synced 2025-12-06 02:49:55 +00:00
support for snapshots recovery
This commit is contained in:
@ -2,4 +2,10 @@ EN_ETH_CLIENT_URL="{{ eth_l1_url | mandatory }}"
|
||||
EN_MAIN_NODE_URL="{{ main_node_url | mandatory }}"
|
||||
EN_L2_CHAIN_ID="{{ l2_chain_id | mandatory }}"
|
||||
EN_L1_CHAIN_ID="{{ l1_chain_id | mandatory }}"
|
||||
{% if enable_snapshots_recovery %}
|
||||
EN_SNAPSHOTS_RECOVERY_ENABLED="true"
|
||||
EN_SNAPSHOTS_OBJECT_STORE_MODE="GCSAnonymousReadOnly"
|
||||
EN_SNAPSHOTS_OBJECT_STORE_BUCKET_BASE_URL="{{ snapshots_bucket_base_url | mandatory }}"
|
||||
{% endif %}
|
||||
|
||||
DATABASE_URL="postgres://{{ database_username | mandatory }}:{{ database_password | mandatory }}@postgres/{{ database_name | mandatory }}"
|
||||
|
||||
@ -3,7 +3,7 @@ set -e
|
||||
|
||||
{% if force_pg_restore %}
|
||||
pg_restore --clean --exit-on-error -j $(nproc --all) -d postgres -U $POSTGRES_USER --no-owner --no-privileges --disable-triggers --create /pg_backups/external_node_latest.pgdump
|
||||
{% else %}
|
||||
{% elif not enable_snapshots_recovery %}
|
||||
if psql -U $POSTGRES_USER -d postgres -lqt | cut -d \| -f 1 | grep -qw "{{ database_name }}"; then
|
||||
echo "Database already exists"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user