mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-04-15 03:01:37 -05:00
Merge pull request #3485 from jaswilli/migration
Fix naming of export file during migration
This commit is contained in:
commit
a13f460acb
1 changed files with 5 additions and 3 deletions
|
@ -44,10 +44,12 @@ backupDatabase = function backupDatabase() {
|
|||
logInfo('Creating database backup');
|
||||
return dataExport().then(function (exportedData) {
|
||||
// Save the exported data to the file system for download
|
||||
var fileName = path.resolve(config.paths.contentPath + '/data/' + dataExport.fileName());
|
||||
return dataExport.fileName().then(function (fileName) {
|
||||
fileName = path.resolve(config.paths.contentPath + '/data/' + fileName);
|
||||
|
||||
return nodefn.call(fs.writeFile, fileName, JSON.stringify(exportedData)).then(function () {
|
||||
logInfo('Database backup written to: ' + fileName);
|
||||
return nodefn.call(fs.writeFile, fileName, JSON.stringify(exportedData)).then(function () {
|
||||
logInfo('Database backup written to: ' + fileName);
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue