Skip to content

Commit c07483d

Browse files
FEATURE (comparisons): Add comparisons
1 parent 0e16835 commit c07483d

File tree

10 files changed

+4410
-21
lines changed

10 files changed

+4410
-21
lines changed

app/components/DocsSidebarComponent.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,17 @@ const navItems: NavItem[] = [
5555
{ title: "How to add notifier", href: "/contribute/how-to-add-notifier" },
5656
],
5757
},
58+
{
59+
title: "Comparisons",
60+
href: "/pgdump-alternative",
61+
children: [
62+
{ title: "pg_dump alternative", href: "/pgdump-alternative" },
63+
{ title: "Postgresus vs Barman", href: "/postgresus-vs-barman" },
64+
{ title: "Postgresus vs PgBackWeb", href: "/postgresus-vs-pgbackweb" },
65+
{ title: "Postgresus vs pgBackRest", href: "/postgresus-vs-pgbackrest" },
66+
{ title: "Postgresus vs WAL-G", href: "/postgresus-vs-wal-g" },
67+
],
68+
},
5869
];
5970

6071
export default function DocsSidebarComponent() {

app/components/InstallationComponent.tsx

Lines changed: 58 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@ import { useState } from "react";
44

55
type InstallMethod = "Automated Script" | "Docker Run" | "Docker Compose";
66

7-
type Installation = {
7+
type ScriptVariant = {
88
label: string;
99
code: string;
10+
};
11+
12+
type Installation = {
13+
label: string;
14+
code: string | ScriptVariant[];
1015
language: string;
1116
description: string;
1217
};
@@ -16,15 +21,25 @@ const installationMethods: Record<InstallMethod, Installation> = {
1621
label: "Automated script (recommended)",
1722
language: "bash",
1823
description:
19-
"The installation script will install Docker with Docker Compose (if not already installed), set up Postgresus, and configure automatic startup on system reboot.",
20-
code: `sudo apt-get install -y curl && \\
24+
"The installation script will install Docker with Docker Compose (if not already installed), set up Postgresus and configure automatic startup on system reboot.",
25+
code: [
26+
{
27+
label: "with sudo",
28+
code: `sudo apt-get install -y curl && \\
2129
sudo curl -sSL https://raw.githubusercontent.com/RostislavDugin/postgresus/refs/heads/main/install-postgresus.sh | sudo bash`,
30+
},
31+
{
32+
label: "without sudo",
33+
code: `apt-get install -y curl && \\
34+
curl -sSL https://raw.githubusercontent.com/RostislavDugin/postgresus/refs/heads/main/install-postgresus.sh | bash`,
35+
},
36+
],
2237
},
2338
"Docker Run": {
2439
label: "Docker",
2540
language: "bash",
2641
description:
27-
"The easiest way to run Postgresus. This single command will start Postgresus, store all data in ./postgresus-data directory, and automatically restart on system reboot.",
42+
"The easiest way to run Postgresus. This single command will start Postgresus, store all data in ./postgresus-data directory and automatically restart on system reboot.",
2843
code: `docker run -d \\
2944
--name postgresus \\
3045
-p 4005:4005 \\
@@ -58,18 +73,34 @@ const methods: InstallMethod[] = [
5873
export default function InstallationComponent() {
5974
const [selectedMethod, setSelectedMethod] =
6075
useState<InstallMethod>("Automated Script");
76+
const [selectedVariant, setSelectedVariant] = useState(0);
6177
const [copied, setCopied] = useState(false);
6278

6379
const currentInstallation = installationMethods[selectedMethod];
80+
const hasVariants = Array.isArray(currentInstallation.code);
6481

6582
const handleMethodChange = (method: InstallMethod) => {
6683
setSelectedMethod(method);
84+
setSelectedVariant(0);
85+
setCopied(false);
86+
};
87+
88+
const handleVariantChange = (index: number) => {
89+
setSelectedVariant(index);
6790
setCopied(false);
6891
};
6992

93+
const getCurrentCode = () => {
94+
if (hasVariants) {
95+
return (currentInstallation.code as ScriptVariant[])[selectedVariant]
96+
.code;
97+
}
98+
return currentInstallation.code as string;
99+
};
100+
70101
const handleCopy = async () => {
71102
try {
72-
await navigator.clipboard.writeText(currentInstallation.code);
103+
await navigator.clipboard.writeText(getCurrentCode());
73104
setCopied(true);
74105
setTimeout(() => setCopied(false), 2000);
75106
} catch (err) {
@@ -96,6 +127,27 @@ export default function InstallationComponent() {
96127
))}
97128
</div>
98129

130+
{/* Script variants tabs (only for Automated Script) */}
131+
{hasVariants && (
132+
<div className="mb-4 flex flex-wrap gap-2">
133+
{(currentInstallation.code as ScriptVariant[]).map(
134+
(variant, index) => (
135+
<button
136+
key={index}
137+
onClick={() => handleVariantChange(index)}
138+
className={`cursor-pointer rounded-lg px-4 py-2 text-sm font-medium transition-colors ${
139+
selectedVariant === index
140+
? "bg-blue-100 text-blue-700 ring-2 ring-blue-600"
141+
: "bg-gray-50 text-gray-600 hover:bg-gray-100"
142+
}`}
143+
>
144+
{variant.label}
145+
</button>
146+
)
147+
)}
148+
</div>
149+
)}
150+
99151
{/* Description */}
100152
<div className="mb-4 text-base md:text-lg max-w-[600px]">
101153
{currentInstallation.description}
@@ -105,7 +157,7 @@ export default function InstallationComponent() {
105157
<div className="relative max-w-[600px]">
106158
<pre className="rounded-lg bg-gray-100 p-4 pr-16 text-sm">
107159
<code className="block whitespace-pre-wrap wrap-break-word">
108-
{currentInstallation.code}
160+
{getCurrentCode()}
109161
</code>
110162
</pre>
111163

app/page.tsx

Lines changed: 75 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import LiteYouTubeEmbed from "./components/LiteYouTubeEmbed";
66
export const metadata: Metadata = {
77
title: "Postgresus | PostgreSQL backup",
88
description:
9-
"Free and open source tool for PostgreSQL scheduled backups. Save them locally and to clouds. Notifications to Slack, Discord, etc.",
9+
"Free and open source tool for PostgreSQL scheduled backups. Save them locally and to clouds. Notifications to Slack, Discord etc.",
1010
keywords:
1111
"PostgreSQL, backup, monitoring, database, scheduled backups, Docker, self-hosted, open source, S3, Google Drive, Slack notifications, Discord, DevOps, database monitoring, pg_dump, database restore, encryption, AES-256, backup encryption",
1212
robots: "index, follow",
@@ -18,7 +18,7 @@ export const metadata: Metadata = {
1818
url: "https://postgresus.com",
1919
title: "Postgresus | PostgreSQL backup",
2020
description:
21-
"Free and open source tool for PostgreSQL scheduled backups. Save them locally and to clouds. Notifications to Slack, Discord, etc.",
21+
"Free and open source tool for PostgreSQL scheduled backups. Save them locally and to clouds. Notifications to Slack, Discord etc.",
2222
images: [
2323
{
2424
url: "https://postgresus.com/images/index/dashboard.svg",
@@ -32,7 +32,7 @@ export const metadata: Metadata = {
3232
card: "summary_large_image",
3333
title: "Postgresus | PostgreSQL backup",
3434
description:
35-
"Free and open source tool for PostgreSQL scheduled backups. Save them locally and to clouds. Notifications to Slack, Discord, etc.",
35+
"Free and open source tool for PostgreSQL scheduled backups. Save them locally and to clouds. Notifications to Slack, Discord etc.",
3636
images: ["https://postgresus.com/images/index/dashboard.svg"],
3737
},
3838
applicationName: "Postgresus",
@@ -62,7 +62,7 @@ export default function Index() {
6262
"@type": "SoftwareApplication",
6363
name: "Postgresus",
6464
description:
65-
"Free and open source tool for PostgreSQL scheduled backups. Save them locally and to clouds. Notifications to Slack, Discord, etc.",
65+
"Free and open source tool for PostgreSQL scheduled backups. Save them locally and to clouds. Notifications to Slack, Discord etc.",
6666
url: "https://postgresus.com",
6767
image: "https://postgresus.com/images/index/dashboard.svg",
6868
logo: "https://postgresus.com/logo.svg",
@@ -129,7 +129,7 @@ export default function Index() {
129129
name: "What is Postgresus and why should I use it instead of hand-rolled scripts?",
130130
acceptedAnswer: {
131131
"@type": "Answer",
132-
text: "Postgresus is an Apache 2.0 licensed, self-hosted service backing up PostgreSQL, v13 to v18. It differs from shell scripts in that it has a frontend for scheduling tasks, compressing and storing archives on multiple targets (local disk, S3, Google Drive, Dropbox, etc.) and notifying your team when tasks finish or fail — all without hand-rolled code",
132+
text: "Postgresus is an Apache 2.0 licensed, self-hosted service backing up PostgreSQL, v13 to v18. It differs from shell scripts in that it has a frontend for scheduling tasks, compressing and storing archives on multiple targets (local disk, S3, Google Drive, Dropbox etc.) and notifying your team when tasks finish or fail — all without hand-rolled code",
133133
},
134134
},
135135
{
@@ -298,7 +298,7 @@ export default function Index() {
298298
height={20}
299299
/>
300300
<p>
301-
<b>Scheduled backups</b> (daily, weekly, at 4 AM, etc.)
301+
<b>Scheduled backups</b> (daily, weekly, at 4 AM etc.)
302302
</p>
303303
</div>
304304

@@ -321,7 +321,7 @@ export default function Index() {
321321
width={20}
322322
height={20}
323323
/>
324-
<p>Notifications to Slack, Telegram, Discord, etc.</p>
324+
<p>Notifications to Slack, Telegram, Discord etc.</p>
325325
</div>
326326

327327
<div className="mb-2 flex items-start gap-3">
@@ -867,9 +867,8 @@ export default function Index() {
867867
</div>
868868

869869
<div className="pt-5 text-sm text-gray-600 sm:pt-5 sm:text-base">
870-
Enterprise-grade encryption protects your sensitive
871-
data and backups. Read-only database access prevents data
872-
corruption.{" "}
870+
Enterprise-grade encryption protects your sensitive data and
871+
backups. Read-only database access prevents data corruption.{" "}
873872
<a
874873
href="/security"
875874
className="font-semibold text-blue-600 hover:text-blue-700"
@@ -955,7 +954,7 @@ export default function Index() {
955954
backing up PostgreSQL, v13 to v18. It differs from shell
956955
scripts in that it has a frontend for scheduling tasks,
957956
compressing and storing archives on multiple targets (local
958-
disk, S3, Google Drive, NAS, Dropbox, etc.) and notifying your
957+
disk, S3, Google Drive, NAS, Dropbox etc.) and notifying your
959958
team when tasks finish or fail — all without hand-rolled code
960959
</p>
961960
</div>
@@ -1035,7 +1034,7 @@ export default function Index() {
10351034
Read-only database access — Postgresus only requires SELECT
10361035
permissions and performs comprehensive checks to ensure no
10371036
write privileges exist, preventing data corruption even if the
1038-
tool is compromised.
1037+
tool is compromised.
10391038
</p>
10401039
</div>
10411040

@@ -1127,6 +1126,70 @@ export default function Index() {
11271126
compliance and team accountability.
11281127
</p>
11291128
</div>
1129+
1130+
<div className="mb-8 w-full pr-10 lg:w-1/2">
1131+
<h3 className="mb-3 max-w-[350px] font-bold md:text-xl">
1132+
12. Where can I read comparisons with other PostgreSQL backup
1133+
tools?
1134+
</h3>
1135+
1136+
<p className="max-w-[500px] md:text-lg">
1137+
We have detailed comparison pages for popular backup tools:{" "}
1138+
<a
1139+
href="/pgdump-alternative"
1140+
className="text-blue-600 hover:text-blue-700"
1141+
>
1142+
Postgresus vs pg_dump
1143+
</a>
1144+
,{" "}
1145+
<a
1146+
href="/postgresus-vs-pgbackrest"
1147+
className="text-blue-600 hover:text-blue-700"
1148+
>
1149+
Postgresus vs pgBackRest
1150+
</a>
1151+
,{" "}
1152+
<a
1153+
href="/postgresus-vs-barman"
1154+
className="text-blue-600 hover:text-blue-700"
1155+
>
1156+
Postgresus vs Barman
1157+
</a>
1158+
,{" "}
1159+
<a
1160+
href="/postgresus-vs-wal-g"
1161+
className="text-blue-600 hover:text-blue-700"
1162+
>
1163+
Postgresus vs WAL-G
1164+
</a>
1165+
, and{" "}
1166+
<a
1167+
href="/postgresus-vs-pgbackweb"
1168+
className="text-blue-600 hover:text-blue-700"
1169+
>
1170+
Postgresus vs pgBackWeb
1171+
</a>
1172+
. Each comparison explains the key differences, pros and cons,
1173+
and helps you choose the right tool for your needs.
1174+
</p>
1175+
</div>
1176+
1177+
<div className="mb-8 w-full pr-10 lg:w-1/2">
1178+
<h3 className="mb-3 max-w-[350px] font-bold md:text-xl">
1179+
13. Is Postgresus an alternative to pg_dump?
1180+
</h3>
1181+
1182+
<p className="max-w-[500px] md:text-lg">
1183+
Yes, Postgresus is a modern alternative to pg_dump. Under the
1184+
hood, Postgresus uses pg_dump for creating backups, but
1185+
extends it with a user-friendly web interface, automated
1186+
scheduling, multiple storage destinations, real-time
1187+
notifications, health monitoring and backup encryption. Think
1188+
of Postgresus as pg_dump with superpowers — you get all the
1189+
reliability of pg_dump plus enterprise features without
1190+
writing shell scripts.
1191+
</p>
1192+
</div>
11301193
</div>
11311194
</div>
11321195
</div>

0 commit comments

Comments
 (0)