-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
67 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# app/mailers/backup_report_mailer.rb | ||
class BackupReportMailer < ApplicationMailer | ||
default to: '[email protected]' | ||
|
||
def backup_completed(report) | ||
@report = report | ||
mail(subject: 'Backup Completed Successfully') | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<p>Backup Report for <strong>Linkarooie Project</strong></p> | ||
|
||
<p>We have successfully completed a database backup for the Linkarooie project. Below are the details of the backup:</p> | ||
|
||
<p><strong>Environment:</strong> <%= @report[:environment] %></p> | ||
<p><strong>Timestamp:</strong> <%= @report[:timestamp] %></p> | ||
|
||
<% if @report[:backup_url].present? %> | ||
<p><strong>Backup File:</strong> <a href="<%= @report[:backup_url] %>">Download Backup</a></p> | ||
<% else %> | ||
<p><strong>Backup File:</strong> <%= @report[:backup_file] %></p> | ||
<% end %> | ||
|
||
<p><strong>Backup Size:</strong> <%= @report[:backup_size] %> bytes</p> | ||
<p><strong>Status:</strong> <%= @report[:status] %></p> | ||
|
||
<% if @report[:error_message].present? %> | ||
<p><strong>Error Message:</strong> <%= @report[:error_message] %></p> | ||
<% end %> | ||
|
||
<p>Backup Frequency: <strong>Daily</strong></p> | ||
<p>Backup Storage Location: <strong>DigitalOcean Spaces</strong></p> | ||
|
||
<p>Please review the details above and take any necessary action if the backup status indicates a failure.</p> | ||
|
||
<p>Thank you,</p> | ||
<p>Your Backup System</p> |