<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Database on Besterry — Linux &amp; DevOps Notes</title><link>https://besterry.com/tags/database/</link><description>Recent content in Database on Besterry — Linux &amp; DevOps Notes</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 18 Aug 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://besterry.com/tags/database/index.xml" rel="self" type="application/rss+xml"/><item><title>PostgreSQL Backup Strategies: Not All Backups Are Equal</title><link>https://besterry.com/posts/postgres-backup-strategies/</link><pubDate>Sun, 18 Aug 2024 00:00:00 +0000</pubDate><guid>https://besterry.com/posts/postgres-backup-strategies/</guid><description>&lt;p&gt;A backup you can&amp;rsquo;t restore isn&amp;rsquo;t a backup. After losing data once (fortunately from a test environment), here&amp;rsquo;s the framework I apply now.&lt;/p&gt;
&lt;h2 id="the-three-levels-of-recovery"&gt;The three levels of recovery&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Point-in-time recovery (PITR)&lt;/strong&gt;: Restore to any second in the last N days. Requires WAL archiving + base backups.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Daily snapshots&lt;/strong&gt;: Restore to yesterday&amp;rsquo;s 3am state. Simple, cheap, 24h RPO.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Logical dumps&lt;/strong&gt;: Restore specific tables or data subsets. Useful for selective recovery.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Most production databases should have all three.&lt;/p&gt;</description></item></channel></rss>