-
-
Notifications
You must be signed in to change notification settings - Fork 647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: create database backup on server shutdown #3069
Open
dudantas
wants to merge
16
commits into
main
Choose a base branch
from
dudantas/create-database-backup-on-server-startup
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+127
−4
Conversation
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
dudantas
changed the title
feat: create database backup
feat: create database backup on server startup
Nov 7, 2024
dudantas
force-pushed
the
dudantas/create-database-backup-on-server-startup
branch
from
November 7, 2024 06:26
f23e8a5
to
95a9d3e
Compare
dudantas
force-pushed
the
dudantas/create-database-backup-on-server-startup
branch
from
November 12, 2024 19:12
5c988af
to
b453b80
Compare
elsongabriel
approved these changes
Dec 6, 2024
phacUFPE
approved these changes
Dec 11, 2024
murilo09
approved these changes
Dec 11, 2024
dudantas
force-pushed
the
dudantas/create-database-backup-on-server-startup
branch
from
December 13, 2024 18:01
8967797
to
c677f2e
Compare
Quality Gate passedIssues Measures |
dudantas
changed the title
feat: create database backup on server startup
feat: create database backup on server shutdown
Dec 13, 2024
Quality Gate passedIssues Measures |
andersonfaaria
approved these changes
Dec 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This update introduces a refined automatic database backup feature during the server shutdown process. The main improvements include:
Automatic Compression: The database backup is now always compressed using gzip, reducing disk space usage.
Backup Management: The system organizes backup files into folders named by date and automatically deletes backups older than 7 days. This ensures that the backup storage remains manageable over time without manual intervention.
The motivation behind these changes is to create a more efficient and reliable way of managing database backups, ensuring data safety while optimizing storage space usage. The feature can be highly useful for production servers, as it creates backups during shutdown and maintains them efficiently by automatically removing old backups.
Behaviour
Actual
On server shutdown, no database backup was created automatically, potentially putting the data at risk of loss. There was no effective mechanism for managing old backup files.
Expected
On server shutdown, a backup of the entire database is automatically created, including all tables and data types, ensuring data is always safeguarded. Backups are always compressed, and backups older than 7 days are automatically deleted.
Type of change
How Has This Been Tested
The database backup feature has been tested by:
Checklist