Fix migrations backup/restore (#4055)

This commit is contained in:
Andrey Sobolev 2023-11-24 13:29:35 +07:00 committed by GitHub
parent 91286ab1e6
commit e489cc5d1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 18 additions and 4 deletions

View File

@ -333,10 +333,13 @@ export async function backup (transactorUrl: string, workspaceId: WorkspaceId, s
})) as unknown as CoreClient & BackupClient
console.log('starting backup')
try {
const domains = connection
.getHierarchy()
.domains()
.filter((it) => it !== DOMAIN_TRANSIENT && it !== DOMAIN_MODEL)
const domains = [
...connection
.getHierarchy()
.domains()
.filter((it) => it !== DOMAIN_TRANSIENT && it !== DOMAIN_MODEL),
'_migrations' as Domain
]
console.log('domains for dump', domains.length)
let backupInfo: BackupInfo = {

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

11
tests/tool-local.sh Executable file
View File

@ -0,0 +1,11 @@
export MINIO_ACCESS_KEY=minioadmin
export MINIO_SECRET_KEY=minioadmin
export MINIO_ENDPOINT=localhost:9000
export MONGO_URL=mongodb://localhost:27017
export TRANSACTOR_URL=ws://localhost:3333
export ELASTIC_URL=http://localhost:9200
export SERVER_SECRET=secret
# Restore workspace contents in mongo/elastic
node ../dev/tool/bundle.js $@