عرض عملي: الاستعادة إلى ما قبل DELETE خاطئ بخمس دقائق
في هذا الدرس 3 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
perform a PITR end to end.
تفاصيل المخطط المبدئي
خطوة بخطوة
- Enable WAL archiving and take a base backup; write down the time.
- Run workload, note a safe timestamp, then run
DELETE FROM orderswithout aWHEREclause. - Stop the server and move the damaged data directory aside; restore the base backup.
- Set
recovery_target_timeto five minutes before the delete, createrecovery.signal, and start. - Planned mistake: target a time after the delete; the rows are gone again. Fix: choose an earlier target and repeat.
- Verify row counts, promote, and record the elapsed recovery time.
Prepares MID-018-LAB1.
اختبر فهمك
Why recover to a time before the delete rather than after?
أظهر الإجابة
Replay stops at the target, so the delete is never applied.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.