backupsite: remove bc- prefix from id

This commit is contained in:
Girish Ramakrishnan
2025-10-01 10:27:14 +02:00
parent 0f29652b96
commit ab0f8fc081
3 changed files with 3 additions and 3 deletions

View File

@@ -48,7 +48,7 @@ exports.up = async function (db) {
privateKeyEncoding: { type: 'pkcs8', format: 'pem' } privateKeyEncoding: { type: 'pkcs8', format: 'pem' }
}); });
const id = `bc-${crypto.randomUUID()}`; const id = crypto.randomUUID();
// convert existing configuration into a backup target // convert existing configuration into a backup target
for (const r of results) { for (const r of results) {

View File

@@ -22,7 +22,7 @@ exports.up = async function(db) {
const currentBackupSite = backupSites[0]; const currentBackupSite = backupSites[0];
let cloneBackupSite = null; let cloneBackupSite = null;
if (totalCount && currentBackupSite.format !== theOneFormat) { if (totalCount && currentBackupSite.format !== theOneFormat) {
const cloneId = `bc-${crypto.randomUUID()}`; const cloneId = crypto.randomUUID();
cloneBackupSite = Object.assign({}, backupSites[0], { id: cloneId }); cloneBackupSite = Object.assign({}, backupSites[0], { id: cloneId });
cloneBackupSite.format = currentBackupSite.format === 'rsync' ? 'tgz' : 'rsync'; cloneBackupSite.format = currentBackupSite.format === 'rsync' ? 'tgz' : 'rsync';
cloneBackupSite.priority = false; cloneBackupSite.priority = false;

View File

@@ -542,7 +542,7 @@ async function add(data, auditSource) {
privateKeyEncoding: { type: 'pkcs8', format: 'pem' } 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}`); 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'); debug('add: validating new storage configuration');