---
title: "How to Back Up PostgreSQL in Docker (Local, S3, and Plakar) — Nick Janetakis"
url: https://daily.dev/posts/how-to-back-up-postgresql-in-docker-local-s3-and-plakar-nick-janetakis-l64ac1yno
source_url: https://nickjanetakis.com/blog/how-to-back-up-postgresql-in-docker-local-s3-and-plakar
type: article
source: "Nick Janetakis"
published: 2026-07-21T11:09:58.019Z
updated: 2026-07-21T11:10:22.532Z
tags: ["docker", "postgresql", "aws-s3"]
reading_time: 44
upvotes: 24
comments: 2
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Back Up PostgreSQL in Docker (Local, S3, and Plakar) — Nick Janetakis

**[Nick Janetakis](https://daily.dev/sources/nickjanetakis)** · 44 min read · 24 upvotes · 2 comments

## Summary

A comprehensive guide to backing up PostgreSQL databases running in Docker, covering three approaches: local filesystem, AWS S3, and using Plakar (an open source deduplication backup tool). Includes shell scripts for automated daily backups via cron, restore procedures, and a cost comparison showing how Plakar's deduplication can reduce S3 storage from ~455 GB to ~65 GB after one year of growth. Also covers Plakar installation, repository setup, snapshot management, pruning policies, and syncing between local and S3 storage backends.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://nickjanetakis.com/blog/how-to-back-up-postgresql-in-docker-local-s3-and-plakar>

## Community discussion

Top comments from developers on daily.dev.

**@fahimahammed** · 0 upvotes

> ![GIF](https://static.klipy.com/ii/4e7bea9f7a3371424e6c16ebc93252fe/d0/24/0OkGR1vsIqWxf5lY3.gif)

---

Tags: [#docker](https://daily.dev/tags/docker), [#postgresql](https://daily.dev/tags/postgresql), [#aws-s3](https://daily.dev/tags/aws-s3)

[View this post on daily.dev](https://daily.dev/posts/how-to-back-up-postgresql-in-docker-local-s3-and-plakar-nick-janetakis-l64ac1yno)
