clone: save app config
clone also clones the tags, labels and icon. this is not done for restore or import since it's not clear if this is a good idea or not. for example, if user had some custom tags and label set and then restores to some old backup, is it expected to reset the labels and tags?
This commit is contained in:
@@ -1063,16 +1063,16 @@ function snapshotApp(app, progressCallback, callback) {
|
||||
const startTime = new Date();
|
||||
progressCallback({ message: `Snapshotting app ${app.fqdn}` });
|
||||
|
||||
if (!safe.fs.writeFileSync(path.join(paths.APPS_DATA_DIR, app.id + '/config.json'), JSON.stringify(app))) {
|
||||
return callback(new BoxError(BoxError.FS_ERROR, 'Error creating config.json: ' + safe.error.message));
|
||||
}
|
||||
apps.backupConfig(app, function (error) {
|
||||
if (error) return callback(error);
|
||||
|
||||
services.backupAddons(app, app.manifest.addons, function (error) {
|
||||
if (error) return callback(new BoxError(BoxError.EXTERNAL_ERROR, error.message));
|
||||
services.backupAddons(app, app.manifest.addons, function (error) {
|
||||
if (error) return callback(error);
|
||||
|
||||
debugApp(app, `snapshotApp: took ${(new Date() - startTime)/1000} seconds`);
|
||||
debugApp(app, `snapshotApp: took ${(new Date() - startTime)/1000} seconds`);
|
||||
|
||||
return callback(null);
|
||||
return callback(null);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user