[{"data":1,"prerenderedAt":188},["ShallowReactive",2],{"seo-verification":3,"blog-self-host-databasus-postgresql-backup-vps-en":6},{"google":4,"bing":5},"EycwPY2XMyTkVzas3n1ygeNJFGAH513qrMjfDljzsMQ","",{"key":7,"data":8},"blog-self-host-databasus-postgresql-backup-vps-en",{"id":9,"slug":10,"slugs":11,"title":15,"excerpt":16,"readTime":17,"views":18,"isPinned":19,"publishedAt":20,"updatedAt":21,"category":22,"categories":28,"featuredImage":30,"bgImage":31,"posterImage":32,"relatedSolution":33,"intro":36,"sections":37,"ctaTitle":123,"ctaBody":124,"ctaButton":125,"ctaUrl":126,"relatedPosts":127},491,"self-host-databasus-postgresql-backup-vps",{"fr":12,"en":10,"ar":13,"es":14},"self-host-databasus-vps","استضافة-databasus-على-vps-نسخ-احتياطي-postgresql","autoalojar-databasus-copias-postgresql-vps","Self-Host Databasus: Verified PostgreSQL Backups on a VPS","Install Databasus on a VPS: scheduled, encrypted PostgreSQL, MySQL and MongoDB backups, shipped to S3 and verified by a real restore.",6,0,false,"2026-10-22T00:00:00+00:00","2026-10-23T13:27:02+00:00",{"id":23,"name":24,"slug":25,"color":26,"icon":27},7,"Self-hosting","self-hosting","bg-indigo-500\u002F10 text-indigo-400","cloud",[29],{"id":23,"name":24,"slug":25,"color":26,"icon":27},null,"\u002Fblog\u002Fcovers\u002Fbg.svg","\u002Fblog\u002Fcovers\u002Fself-host-databasus-vps-poster.svg",{"categorySlug":34,"appSlug":35},"databases","databasus","A database without a tested backup is a bet. Databasus is an open-source (Apache-2.0) tool that schedules backups of your PostgreSQL, MySQL, MariaDB and MongoDB databases, encrypts them, ships them to the storage of your choice — local disk, S3, Cloudflare R2, Google Drive, SFTP — and, above all, checks that they restore by actually restoring them. This guide installs it as a single Docker container on a VPS and sets up a first verified PostgreSQL backup.",[38,42,53,88,91,107,111,114,117,120],{"type":39,"title":40,"body":41},"h2","Why a dedicated tool rather than pg_dump in a crontab","The most common backup fits on one line: a `pg_dump` run nightly by cron, compressed into a directory. It works until the day you find out it had been failing for three weeks with nobody notified, that the disk was full, or that the file does not restore for lack of the right role.\n\nDatabasus addresses exactly those blind spots: it reports every failure, applies a retention policy, ships copies off the machine, and proves that they restore. For PostgreSQL it adds what a dump cannot do: incremental physical backups and WAL streaming, which let you roll back to the minute before a mistake.",{"type":43,"title":44,"items":45},"ul","What Databasus gives you",[46,47,48,49,50,51,52],"**Physical and logical PostgreSQL** — full and incremental backups, WAL streaming and point-in-time recovery (PITR).","**MySQL, MariaDB, MongoDB** — compressed logical backups from the same interface.","**Fine-grained scheduling** — hourly, daily, weekly, monthly or a cron expression.","**Verified restores** — a real restore into a temporary database and a per-table report.","**Many storages** — local disk, S3, Cloudflare R2, Google Drive, SFTP, Rclone.","**AES-256-GCM encryption** — files stay unreadable even on shared storage.","**Teams** — workspaces, roles, audit log and email, Telegram, Slack or webhook notifications.",{"type":54,"title":55,"headers":56,"rows":60},"comparison","Databasus versus the usual methods",[5,57,58,59],"Databasus","pg_dump + cron","VPS snapshot",[61,66,71,76,80,84],[62,63,64,65],"Alert on failure","Yes, several channels","Write it yourself","Depends on the host",[67,68,69,70],"Point-in-time recovery","Yes (WAL streaming)","No","No, only the snapshot time",[72,73,74,75],"Off-machine copy","S3, R2, SFTP, Drive…","Script it","At the host",[77,78,79,79],"Verified restore","Automatic, with a report","Manual",[81,82,82,83],"Granularity","Per database","The whole disk",[85,86,69,87],"Interface and team","Yes, roles and audit","Host console",{"type":39,"title":89,"body":90},"Prerequisites","An Ubuntu 24.04 VPS with **1 GB of RAM** is enough to drive the backups; plan disk space if you keep local copies, or an S3 or R2 bucket to send them elsewhere. You need Docker with the Compose plugin. On the database side, you need network access from the VPS and a user dedicated to backups.\n\nIf your databases run on other servers, open their port only to the IP address of the Databasus VPS, never to the whole Internet: a firewall that accepts only that source limits exposure to a single machine you control. For a database on the same VPS, no inbound port needs to be opened.",{"type":92,"title":93,"steps":94},"steps","Install Databasus with Docker Compose",[95,98,101,104],{"title":96,"body":97},"Create the Compose file","Create an `\u002Fopt\u002Fdatabasus` directory and put this `docker-compose.yml` in it. The port is published on the loopback only, and `extra_hosts` lets the container reach a database installed on the VPS itself through the name `host.docker.internal`.\n```yaml\nservices:\n  databasus:\n    image: databasus\u002Fdatabasus:v3.62.0\n    restart: unless-stopped\n    ports:\n      - \"127.0.0.1:4005:4005\"\n    extra_hosts:\n      - \"host.docker.internal:host-gateway\"\n    volumes:\n      - databasus-data:\u002Fdatabasus-data\n\nvolumes:\n  databasus-data: {}\n```",{"title":99,"body":100},"Start the container","Start Databasus and follow its boot:\n```bash\ndocker compose up -d\ndocker compose logs -f databasus\n```\n\nOn first start, the image initialises its own metadata database and applies its migrations in the `databasus-data` volume. The line `http server listening on :4005` tells you it is ready, within seconds.",{"title":102,"body":103},"Open the interface and create the account","From your machine, open an SSH tunnel to the VPS:\n```bash\nssh -L 4005:127.0.0.1:4005 root@\u003Cip-vps>\n```\n\nThen go to http:\u002F\u002Flocalhost:4005 and create your account: **the first account created becomes the administrator**. Later sign-ups stay open by default with a member role, so turn off external registrations in the settings.",{"title":105,"body":106},"Declare a PostgreSQL database","On the PostgreSQL server, create a dedicated role that can only read:\n```sql\nCREATE ROLE databasus WITH LOGIN PASSWORD 'a-long-password';\nGRANT pg_read_all_data TO databasus;\n```\n\nIn Databasus, add the database with its host (for a database on the same VPS: `host.docker.internal`), its port, that role and its password, then a storage destination and a schedule. Run a first backup by hand to check that it completes.",{"type":108,"title":109,"body":110},"tip","Always keep a copy off the VPS","A backup kept on the server's disk protects against an unfortunate `DROP TABLE`, not against losing the machine. Add at least one external destination — an S3 or R2 bucket — and enable encryption: the file is then useless to anyone who reaches it without the key.",{"type":39,"title":112,"body":113},"Pick a retention policy","Databasus offers four ways to bound history: a **duration** (keep seven days, three months, a year), a **count** (the last thirty), a **GFS** rotation (grandfather, father, son: hourly, daily, weekly, monthly and yearly copies kept independently) and **size caps**, per backup and in total.\n\nFor a production application, a good starting point is a daily backup kept for thirty days, plus a monthly GFS rotation over a year, and a total size cap that keeps storage from overflowing. Add WAL streaming if losing a day of data is unacceptable.",{"type":39,"title":115,"body":116},"Check that restores work","This is the feature that sets Databasus apart. After each backup, or on a schedule, it starts a temporary database, restores the copy into it, compares the resulting size with the backup's and lists every table with its row count. The report can be sent to you, or only the failures.\n\nSchedule at least a weekly verification of your most important database. On the day of an incident you will not discover a missing extension or role: the verification will have told you weeks earlier.\n\nKeep a record of these reports as well: they are dated proof that your recovery plan has been exercised. It is often the first question a client or an auditor asks after an incident, and the answer \"we restore every week, here are the reports\" closes the discussion.",{"type":39,"title":118,"body":119},"Troubleshooting","**Connecting to a database on the same VPS fails.** The database server only listens on `127.0.0.1`: add the Docker network interface to `listen_addresses` (PostgreSQL) or `bind-address` (MySQL), allow the Docker subnet in `pg_hba.conf`, then restart the service.\n\n**A backup to S3 fails.** Check the region, the bucket name and the access key's rights: it must be able to write, list and delete objects under the chosen prefix, otherwise retention cannot purge old copies.\n\n**No notification arrives.** Test the channel from its settings page; for email, an SMTP server must be set in the settings.\n\n**The interface stops responding.** Read the logs with `docker compose logs --tail 100 databasus`: every background job is logged at start-up.",{"type":39,"title":121,"body":122},"One-click install from the ServOrbit Marketplace","The ServOrbit Marketplace installs Databasus on your VPS with no command line: it deploys the container with `host.docker.internal` access already declared, publishes the port on the loopback and shows in the client area the port to use for the SSH tunnel. You can also attach a domain for permanent HTTPS access.","Your database backups, on your own VPS","A ServOrbit Ubuntu 24.04 VPS with 1 GB of RAM is enough for Databasus. One-click install from the Marketplace, access through an SSH tunnel, and your backups go to the storage you choose.","Install Databasus","\u002Fmarketplace\u002Fdatabases\u002Fdatabasus",[128,150,171],{"id":129,"slug":130,"slugs":131,"title":135,"excerpt":136,"readTime":137,"views":18,"isPinned":19,"publishedAt":138,"updatedAt":139,"category":140,"categories":145,"featuredImage":30,"bgImage":31,"posterImage":147,"relatedSolution":148},56,"postgresql-on-a-vps-a-reliable-and-controlled-database",{"fr":132,"en":130,"ar":133,"es":134},"heberger-postgresql-vps","postgresql-على-خادم-vps-قاعدة-بيانات-موثوقة-ومتحكم-بها","alojar-postgresql-en-un-vps","PostgreSQL on a VPS: reliable, controlled database","Host PostgreSQL on a VPS: production config, pgBackRest backups, streaming HA, RDS\u002FSupabase\u002FNeon comparison and OOM troubleshooting.",9,"2026-04-25T00:00:00+00:00","2026-10-21T15:21:37+00:00",{"id":17,"name":141,"slug":142,"color":143,"icon":144},"Databases","bases-de-donnees","bg-teal-500\u002F10 text-teal-400","database",[146],{"id":17,"name":141,"slug":142,"color":143,"icon":144},"\u002Fblog\u002Fcovers\u002Fheberger-postgresql-vps-poster.svg",{"categorySlug":34,"appSlug":149},"postgresql-stack",{"id":151,"slug":152,"slugs":153,"title":157,"excerpt":158,"readTime":159,"views":18,"isPinned":19,"publishedAt":160,"updatedAt":161,"category":162,"categories":168,"featuredImage":30,"bgImage":31,"posterImage":170,"relatedSolution":30},347,"restic-s3-3-2-1-backup-strategy-vps",{"fr":154,"en":152,"ar":155,"es":156},"backup-vps-restic-s3-3-2-1","restic-s3-3-2-1-backup-strategy-vps-ar","estrategia-3-2-1-backup-vps-restic-s3","3-2-1 Backup Strategy for Your VPS with Restic and S3","Build a complete 3-2-1 strategy on your VPS: Restic to Backblaze B2 or Cloudflare R2, systemd timer, retention policy and automated restore test.",11,"2026-09-10T00:00:00+00:00","2026-10-20T23:18:06+00:00",{"id":163,"name":164,"slug":165,"color":166,"icon":167},8,"Security & Monitoring","securite-monitoring","bg-rose-500\u002F10 text-rose-400","security",[169],{"id":163,"name":164,"slug":165,"color":166,"icon":167},"\u002Fblog\u002Fcovers\u002Fbackup-vps-restic-s3-3-2-1-poster.svg",{"id":172,"slug":173,"slugs":174,"title":178,"excerpt":179,"readTime":180,"views":181,"isPinned":19,"publishedAt":182,"updatedAt":183,"category":184,"categories":185,"featuredImage":30,"bgImage":31,"posterImage":187,"relatedSolution":30},239,"self-hosted-postgresql-vs-amazon-rds-roi-comparison",{"fr":175,"en":173,"ar":176,"es":177},"postgresql-self-hosted-vs-rds","postgresql-sur-vps-vs-amazon-rds-مقارنة-التكلفة-2026","postgresql-autoalojado-vs-amazon-rds","Self-Hosted PostgreSQL vs Amazon RDS: ROI Comparison","Real cost of PostgreSQL on a VPS vs Amazon RDS in 2026: figures, configuration, troubleshooting and migration guide.",10,3,"2026-08-09T00:00:00+00:00","2026-09-08T22:00:02+00:00",{"id":17,"name":141,"slug":142,"color":143,"icon":144},[186],{"id":17,"name":141,"slug":142,"color":143,"icon":144},"\u002Fblog\u002Fcovers\u002Fpostgresql-self-hosted-vs-rds-poster.svg",1792763229849]