Working tree is now the canonical repo. Off-chain play-money + trustless on-chain (FPMM AMM + CLOB via UMA settlement), AI market factory, creator/social/distribution, mobile shell + push, one-command demo + deploy-kit. Secrets excluded (see ENV-AND-KEYS.md). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
17 lines
586 B
TypeScript
17 lines
586 B
TypeScript
import { v1 } from 'firebase-admin/firestore'
|
|
import { getServiceAccountCredentials } from 'shared/init-admin'
|
|
import { backupDbCore } from 'functions/scheduled/backup-db'
|
|
|
|
async function backupDb() {
|
|
const credentials = getServiceAccountCredentials()
|
|
const projectId = credentials.project_id
|
|
const client = new v1.FirestoreAdminClient({ credentials })
|
|
const bucket = 'oracle-firestore-backup'
|
|
const resp = await backupDbCore(client, projectId, bucket)
|
|
console.log(`Operation: ${resp[0]['name']}`)
|
|
}
|
|
|
|
if (require.main === module) {
|
|
backupDb().then(() => process.exit())
|
|
}
|