How to backup & restore chirpstack_as database?

HI, I deploy Application Server/Network Server/Gateway Bridge in my server, and have configured. I fail to import data from *.sql which exported from server. Any guideline for it?

PS.
postgresql 9.5
chirpstack-application-server-3.12.2

explain your fail in details. your current post about nothing.

Hi @chongxishen
please follow below post for database backup and restore

thank you for your reply.

here are one of sync data errors:

Query:
INSERT INTO “public”.“application”(“id”, “name”, “description”, “organization_id”, “service_profile_id”, “payload_codec”, “payload_encoder_script”, “payload_decoder_script”) VALUES (2, ‘cits_device’, ‘cits device application’, 1, ‘73fda288-9141-4f01-8593-593e7b92f772’, ‘’, ‘’, ‘’)
Result: 错误: 插入或更新表 “application” 违反外键约束 “application_service_profile_id_fkey”
DETAIL: 键值对(service_profile_id)=(73fda288-9141-4f01-8593-593e7b92f772)没有在表"service_profile"中出现.

// translated by self
INSERT INTO “public”.“application”(“id”, “name”, “description”, “organization_ id”, “service_ profile_ id”, “payload_ codec”, “payload_ encoder_ script”, “payload_ decoder_ script”) VALUES (2, ‘cits_ device’, ‘cits device application’, 1, ‘73fda288-9141-4f01-8593-593e7b92f772’, ‘’, ‘’, ‘’)
Result: error: insert or update table ‘application’ foreign key constraint fails ‘application’_ service_ profile_ Id_ fkey"
Detail: key value pair (service_ profile_ ID) = (73fda288-9141-4f01-8593-593e7b92f772) is not in the table “service”_ “Profile”

fail to import coz of foreign key constraint fails.
in my way – disable trigger. e.g. alter table api_key disable trigger all;
and I wanna know any guild line for it.

thank your document.