backupsite: remove bc- prefix from id
This commit is contained in:
@@ -48,7 +48,7 @@ exports.up = async function (db) {
|
||||
privateKeyEncoding: { type: 'pkcs8', format: 'pem' }
|
||||
});
|
||||
|
||||
const id = `bc-${crypto.randomUUID()}`;
|
||||
const id = crypto.randomUUID();
|
||||
|
||||
// convert existing configuration into a backup target
|
||||
for (const r of results) {
|
||||
|
||||
@@ -22,7 +22,7 @@ exports.up = async function(db) {
|
||||
const currentBackupSite = backupSites[0];
|
||||
let cloneBackupSite = null;
|
||||
if (totalCount && currentBackupSite.format !== theOneFormat) {
|
||||
const cloneId = `bc-${crypto.randomUUID()}`;
|
||||
const cloneId = crypto.randomUUID();
|
||||
cloneBackupSite = Object.assign({}, backupSites[0], { id: cloneId });
|
||||
cloneBackupSite.format = currentBackupSite.format === 'rsync' ? 'tgz' : 'rsync';
|
||||
cloneBackupSite.priority = false;
|
||||
|
||||
@@ -542,7 +542,7 @@ async function add(data, auditSource) {
|
||||
privateKeyEncoding: { type: 'pkcs8', format: 'pem' }
|
||||
});
|
||||
|
||||
const id = `bc-${crypto.randomUUID()}`;
|
||||
const id = crypto.randomUUID();
|
||||
if (!safe.fs.mkdirSync(`${paths.BACKUP_INFO_DIR}/${id}`)) throw new BoxError(BoxError.FS_ERROR, `Failed to create info dir: ${safe.error.message}`);
|
||||
|
||||
debug('add: validating new storage configuration');
|
||||
|
||||
Reference in New Issue
Block a user