diff --git a/src/mail_templates/backup_failed.ejs b/src/mail_templates/backup_failed.ejs index 20021d9eb..a3f90d039 100644 --- a/src/mail_templates/backup_failed.ejs +++ b/src/mail_templates/backup_failed.ejs @@ -2,7 +2,10 @@ Dear <%= cloudronName %> Admin, -creating a backup has failed. +Cloudron failed to create a complete backup. Please see https://cloudron.io/documentation/troubleshooting/#backups +for troubleshooting. + +Logs for this failure are available at <%= logUrl %> ------------------------------------- diff --git a/src/mailer.js b/src/mailer.js index d611f37dd..e4ffd60b3 100644 --- a/src/mailer.js +++ b/src/mailer.js @@ -448,7 +448,7 @@ function sendDigest(info) { }); } -function backupFailed(errorMessage) { +function backupFailed(errorMessage, logUrl) { getMailConfig(function (error, mailConfig) { if (error) return debug('Error getting mail details:', error); @@ -456,7 +456,7 @@ function backupFailed(errorMessage) { from: mailConfig.notificationFrom, to: config.provider() === 'caas' ? 'support@cloudron.io' : mailConfig.adminEmails.join(', '), subject: util.format('[%s] Failed to backup', mailConfig.cloudronName), - text: render('backup_failed.ejs', { cloudronName: mailConfig.cloudronName, message: errorMessage, format: 'text' }) + text: render('backup_failed.ejs', { cloudronName: mailConfig.cloudronName, message: errorMessage, logUrl: logUrl, format: 'text' }) }; enqueue(mailOptions); diff --git a/src/notifications.js b/src/notifications.js index 28aca5009..7e241396b 100644 --- a/src/notifications.js +++ b/src/notifications.js @@ -295,7 +295,7 @@ function backupFailed(eventId, taskId, errorMessage, callback) { assert.strictEqual(typeof callback, 'function'); actionForAllAdmins([], function (admin, callback) { - mailer.backupFailed(errorMessage); + mailer.backupFailed(errorMessage, `${config.adminOrigin()}/logs.html?taskId=${taskId}`); add(admin.id, eventId, 'Failed to backup', `Backup failed: ${errorMessage}. Logs are available [here](/logs.html?taskId=${taskId}). Will be retried in 4 hours`, callback); }, callback); }