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' }
|
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) {
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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');
|
||||||
|
|||||||
Reference in New Issue
Block a user