Skip to content

Commit 00c35a1

Browse files
committed
Pgbackrest and replication
1 parent 1457c8a commit 00c35a1

File tree

8 files changed

+42
-16
lines changed

8 files changed

+42
-16
lines changed

.vscode/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
{
2-
"asciidoc.antora.enableAntoraSupport": false
32
}
Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
1-
=== Install dependencies
1+
# Installation
22

3-
[source, shell]
4-
----
3+
## Install dependencies
4+
5+
```bash
56
sudo apt-get install postgresql-client libxml2
6-
----
7+
```
78

8-
=== Copy the build to `/usr/bin`
9+
## Copy the build to `/usr/bin`
910

10-
[source, shell]
11-
----
11+
```bash
1212
sudo scp build:/build/pgbackrest-release-2.30/src/pgbackrest /usr/bin
1313

1414
sudo chmod 755 /usr/bin/pgbackrest
15-
----
15+
```
1616

1717

18-
=== pgBackRest requires log and configuration directories and a configuration file.
18+
## pgBackRest requires log and configuration directories and a configuration file.
1919

20-
[source, shell]
21-
----
20+
```bash
2221
sudo mkdir -p -m 770 /var/log/pgbackrest
2322

2423
sudo chown postgres:postgres /var/log/pgbackrest
@@ -32,9 +31,11 @@ sudo touch /etc/pgbackrest/pgbackrest.conf
3231
sudo chmod 640 /etc/pgbackrest/pgbackrest.conf
3332

3433
sudo chown postgres:postgres /etc/pgbackrest/pgbackrest.conf
35-
----
34+
```
3635

37-
=== Make sure the installation worked
36+
## Make sure the installation worked
3837

3938

40-
sudo -u postgres pgbackrest
39+
```bash
40+
sudo -u postgres pgbackrest
41+
````

Backup/PgBackRest/build.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,25 @@ wget -q -O - https://github.com/pgbackrest/pgbackrest/archive/release/2.53.1.tar
1616

1717
* Install build dependencies
1818

19+
```bash
20+
sudo apt-get install python3-distutils meson gcc libpq-dev libssl-dev libxml2-dev pkg-config liblz4-dev libzstd-dev libbz2-dev libz-dev libyaml-dev libssh2-1-dev
21+
```
22+
23+
old version dependencies
24+
1925
```bash
2026
sudo apt-get install make gcc libpq-dev libssl-dev libxml2-dev pkg-config liblz4-dev libzstd-dev libbz2-dev libz-dev
2127
```
2228

2329
* Configure and compile pgBackRest
2430

31+
```bash
32+
meson setup /build/pgbackrest /build/pgbackrest-release-2.53.1
33+
ninja -C /build/pgbackrest
34+
````
35+
36+
for old versions,
37+
2538
```bash
2639
cd /build/pgbackrest-release-2.53.1/src && ./configure && make
2740
```

Backup/PgBackRest/pgbackrest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
* [Introduction](Backup/PgBackRest/Intro.md)
66
* [Build](Backup/PgBackRest/build.md)
7-
*
7+
* [Installation](../../Backup/PgBackRest/Installation.md)

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
* [Extension](Extension/Extension.md)
1313

1414
* [PostGis](Extension/postgis.md)
15+
16+
* [Replication](Replication/Replication.md)
1517

1618
* [FWD (Foreign Data Wrapper)](Foreign%20Data%20Wrapper/fwd.md)
1719

Replication/Replication.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# What Is PostgreSQL Replication?
2+
3+
PostgreSQL replication is defined as the process of copying data from a PostgreSQL database server to another server. The source database server is also known as the “primary” server, whereas the database server receiving the copied data is known as the “replica” server.
4+
5+
`Primary Server/Node` -> where all writes happens
6+
7+
`Replica Server/Node` -> read-only replica server, receives the primary node broadcast

_navbar.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
* [PostGis](Extension/postgis.md)
1313

14+
* [Replication](Replication/Replication.md)
15+
1416
* [FWD](Foreign%20Data%20Wrapper/fwd.md)
1517

1618
* [Cluster](Cluster/Commands.md)

_sidebar.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
* [PostGis](Extension/postgis.md)
1313

14+
* [Replication](Replication/Replication.md)
15+
1416
* [FWD](Foreign%20Data%20Wrapper/fwd.md)
1517

1618
* [Cluster](Cluster/Commands.md)

0 commit comments

Comments
 (0)