Formatting.
This commit is contained in:
parent
fe66c3535c
commit
72c3ff8c2e
|
@ -1,4 +1,9 @@
|
||||||
const { getAppId, setCookie, getCookie, clearCookie } = require("@budibase/auth").utils
|
const {
|
||||||
|
getAppId,
|
||||||
|
setCookie,
|
||||||
|
getCookie,
|
||||||
|
clearCookie,
|
||||||
|
} = require("@budibase/auth").utils
|
||||||
const { Cookies } = require("@budibase/auth").constants
|
const { Cookies } = require("@budibase/auth").constants
|
||||||
const { getRole } = require("@budibase/auth/roles")
|
const { getRole } = require("@budibase/auth/roles")
|
||||||
const { getGlobalSelf } = require("../utilities/workerRequests")
|
const { getGlobalSelf } = require("../utilities/workerRequests")
|
||||||
|
|
|
@ -18,7 +18,10 @@ const download = require("download")
|
||||||
const env = require("../../environment")
|
const env = require("../../environment")
|
||||||
const { homedir } = require("os")
|
const { homedir } = require("os")
|
||||||
const fetch = require("node-fetch")
|
const fetch = require("node-fetch")
|
||||||
const { USER_METDATA_PREFIX, LINK_USER_METADATA_PREFIX } = require("../../db/utils")
|
const {
|
||||||
|
USER_METDATA_PREFIX,
|
||||||
|
LINK_USER_METADATA_PREFIX,
|
||||||
|
} = require("../../db/utils")
|
||||||
|
|
||||||
const DEFAULT_AUTOMATION_BUCKET =
|
const DEFAULT_AUTOMATION_BUCKET =
|
||||||
"https://prod-budi-automations.s3-eu-west-1.amazonaws.com"
|
"https://prod-budi-automations.s3-eu-west-1.amazonaws.com"
|
||||||
|
@ -120,7 +123,11 @@ exports.performBackup = async (appId, backupName) => {
|
||||||
const instanceDb = new CouchDB(appId)
|
const instanceDb = new CouchDB(appId)
|
||||||
await instanceDb.dump(writeStream, {
|
await instanceDb.dump(writeStream, {
|
||||||
// filter out anything that has a user metadata structure in its ID
|
// filter out anything that has a user metadata structure in its ID
|
||||||
filter: doc => !(doc._id.includes(USER_METDATA_PREFIX) || doc.includes(LINK_USER_METADATA_PREFIX))
|
filter: doc =>
|
||||||
|
!(
|
||||||
|
doc._id.includes(USER_METDATA_PREFIX) ||
|
||||||
|
doc.includes(LINK_USER_METADATA_PREFIX)
|
||||||
|
),
|
||||||
})
|
})
|
||||||
// write the file to the object store
|
// write the file to the object store
|
||||||
await streamUpload(
|
await streamUpload(
|
||||||
|
|
Loading…
Reference in New Issue