Skip to content
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(database): Physical Backup & Restore #2419

Draft
wants to merge 29 commits into
base: master
Choose a base branch
from

Conversation

tanmoysrt
Copy link
Member

@tanmoysrt tanmoysrt commented Jan 14, 2025

Resolve #1093

  • Physical Backup Flow [Tested]
  • Physical Restoration Flow via Physical Backup Restoration doctype [Not Tested]
  • Integrate in site migration
  • UI Update
  • Testcases (if any)

Agent PR - frappe/agent#154

For physical backup, we don't need boot volume,
  Just need data volume which holds /var/lib/mysql
On agent callback, store the table schema
 Innodb tables and MyISAM table names of the database
 From Agent Job data to Site Backup doctype
For physical restore, we will attach other disk to the server
That can mess up with logic of disk size and other things
So, put those kind of volumes in temporary volume list
To prevent any miscalculation
We are validating the requests by provided request key
Instead of adding ignore_permissions, temporarily set user to Admin
Then, reset it back
@frappe frappe deleted a comment from codecov bot Jan 17, 2025
Copy link

codecov bot commented Jan 17, 2025

Codecov Report

Attention: Patch coverage is 27.63975% with 233 lines in your changes missing coverage. Please review.

Project coverage is 37.98%. Comparing base (227c62a) to head (4709021).

Files with missing lines Patch % Lines
..._backup_restoration/physical_backup_restoration.py 20.13% 115 Missing ⚠️
press/press/doctype/site_backup/site_backup.py 40.65% 54 Missing ⚠️
...s/press/doctype/virtual_machine/virtual_machine.py 25.00% 18 Missing ⚠️
press/api/site_backup.py 0.00% 17 Missing ⚠️
...ype/virtual_disk_snapshot/virtual_disk_snapshot.py 16.66% 15 Missing ⚠️
press/agent.py 45.45% 6 Missing ⚠️
...storation_step/physical_backup_restoration_step.py 0.00% 5 Missing ⚠️
press/press/doctype/agent_job/agent_job.py 50.00% 2 Missing ⚠️
press/press/doctype/site/site.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2419      +/-   ##
==========================================
- Coverage   38.34%   37.98%   -0.36%     
==========================================
  Files         378      382       +4     
  Lines       29741    30035     +294     
==========================================
+ Hits        11404    11409       +5     
- Misses      18337    18626     +289     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

- Make the step by step method execution like
Virtual Machine Migration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Physical backups and restore during migrations
1 participant