Skip to content

Commit

Permalink
Merge pull request #49 from woblerr/e2e_tests_sftp_improve
Browse files Browse the repository at this point in the history
Add e2e tests for sftp repo with ed25519 keys.
  • Loading branch information
woblerr authored Aug 3, 2024
2 parents 8e96b4b + 3791afb commit 2c38404
Show file tree
Hide file tree
Showing 25 changed files with 198 additions and 32 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ define down_docker_compose
endef

define set_permissions
@chmod 700 e2e_tests/conf/ssh/ e2e_tests/conf/pg/sshd/ e2e_tests/conf/sftp/sshd/ e2e_tests/conf/pgbackrest/cert/
@chmod 600 e2e_tests/conf/ssh/* e2e_tests/conf/pg/sshd/* e2e_tests/conf/sftp/sshd/* e2e_tests/conf/pgbackrest/cert/*
@chmod 700 e2e_tests/conf/ssh/ e2e_tests/conf/pg/sshd/ e2e_tests/conf/sftp/sshd-rsa/ e2e_tests/conf/sftp/sshd-ed25519/ e2e_tests/conf/pgbackrest/cert/
@chmod 600 e2e_tests/conf/ssh/* e2e_tests/conf/pg/sshd/* e2e_tests/conf/sftp/sshd-rsa/* e2e_tests/conf/sftp/sshd-ed25519/* e2e_tests/conf/pgbackrest/cert/*
endef

define gpdb_image_tag
Expand Down
10 changes: 7 additions & 3 deletions e2e_tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The following architecture is used to run the tests.
* Separate containers for minio ang nginx. Official images [minio/minio](https://hub.docker.com/r/minio/minio/), [minio/mc](https://hub.docker.com/r/minio/mc) and [nginx](https://hub.docker.com/_/nginx) are used. It's necessary for S3 compatible storage for WAL archiving and backups.
* Separate container for `sftp` server. It's necessary for sftp compatible storage for WAL archiving and backups. It's custom image, based on `docker-pgbackrest` image.
* Separate containers for `sftp` servers. It's necessary for sftp compatible storage for WAL archiving and backups. It's custom image, based on `docker-pgbackrest` image. The `rsa` (outdated) and `ed25519` keys are checked.
* Separate container with PostgreSQL instance and pgBackRest for backup. It's custom image, based on `docker-pgbackrest` image.
* Separate container with pgBackRest. This is the `docker-pgbackrest` image.

Expand Down Expand Up @@ -131,13 +131,17 @@ openssl x509 -in pgbackrest-selfsigned-client.crt -text -noout
```bash
cd [docker-pgbackrest-root]/e2e_tests/conf/ssh

# ssh keys
# ssh keys rsa
ssh-keygen -f ./id_rsa -t rsa -b 4096 -N "" -C ""

# sftp keys
# sftp keys rsa (not secure, but still very popular)
ssh-keygen -f ./id_rsa_sftp -t rsa -b 4096 -N "" -C "" -m PEM

# sftp keys ed25519
ssh-keygen -f ./id_ed25519_sftp -t ed25519 -N "" -C ""

# authorized_keys
cat ./id_rsa.pub >> ./authorized_keys
cat ./id_rsa_sftp.pub >> ./authorized_keys
cat ./id_ed25519_sftp.pub >> ./authorized_keys
```
19 changes: 16 additions & 3 deletions e2e_tests/conf/backup/backup_pgbackrest-ssh.conf
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,27 @@ repo1-storage-port=443
repo1-storage-verify-tls=n
repo1-retention-diff=2
repo1-retention-full=2
# Repo 2 options (sftp).
# Repo 2 options (sftp rsa).
repo2-path=/var/lib/pgbackrest
repo2-sftp-host=sftp
repo2-sftp-host=sftp-rsa
repo2-sftp-host-port=2222
repo2-sftp-host-key-hash-type=sha1
repo2-sftp-host-user=pgbackrest
repo2-sftp-private-key-file=/home/pgbackrest/.ssh/id_rsa_sftp
repo2-sftp-public-key-file=/home/pgbackrest/.ssh/id_rsa_sftp.pub
repo2-type=sftp
repo2-retention-full=2
repo2-retention-diff=2
repo2-retention-diff=2
# Repo 3 options (sftp ed25519).
# repo3-path should be different than repo2-path in this case.
# See https://github.com/pgbackrest/pgbackrest/issues/2418.
repo3-path=/tmp/demo
repo3-sftp-host=sftp-ed25519
repo3-sftp-host-port=2222
repo3-sftp-host-key-hash-type=sha256
repo3-sftp-host-user=pgbackrest
repo3-sftp-private-key-file=/home/pgbackrest/.ssh/id_ed25519_sftp
repo3-sftp-public-key-file=/home/pgbackrest/.ssh/id_ed25519_sftp.pub
repo3-type=sftp
repo3-retention-full=2
repo3-retention-diff=2
2 changes: 1 addition & 1 deletion e2e_tests/conf/backup/backup_pgbackrest-tls.conf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ repo2-retention-full=2
repo2-retention-diff=2
# Repo 3 options (sftp).
repo3-path=/var/lib/pgbackrest
repo3-sftp-host=sftp
repo3-sftp-host=sftp-rsa
repo3-sftp-host-port=2222
repo3-sftp-host-key-hash-type=sha1
repo3-sftp-host-user=pgbackrest
Expand Down
12 changes: 10 additions & 2 deletions e2e_tests/conf/backup/backup_prepare-ssh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,29 @@ set -e
# Add hosts to known_hosts.
# Necessary for pgBackRest to work correctly over ssh and sftp.
ssh-keyscan -t rsa -p 2222 pg-ssh > ~/.ssh/known_hosts
ssh-keyscan -t rsa -p 2222 sftp >> ~/.ssh/known_hosts
ssh-keyscan -t rsa -p 2222 sftp-rsa >> ~/.ssh/known_hosts
ssh-keyscan -t ed25519 -p 2222 sftp-ed25519 >> ~/.ssh/known_hosts

# Run pgBackRest test commands.
pgbackrest stanza-create --stanza demo
pgbackrest backup --stanza demo --type full --repo 1
pgbackrest backup --stanza demo --type full --repo 2
pgbackrest backup --stanza demo --type diff --repo 2
pgbackrest backup --stanza demo --type full --repo 3

# Get results.
data_repo_1=$(pgbackrest info --stanza demo --repo 1)
data_repo_2=$(pgbackrest info --stanza demo --repo 2)
data_repo_3=$(pgbackrest info --stanza demo --repo 3)
cnt_full_repo_1=$(echo "${data_repo_1}" | grep 'full backup' | wc -l)
cnt_full_repo_2=$(echo "${data_repo_2}" | grep 'full backup' | wc -l)
cnt_diff_repo_2=$(echo "${data_repo_2}" | grep 'diff backup' | wc -l)
cnt_full_repo_3=$(echo "${data_repo_3}" | grep 'full backup' | wc -l)

# Passed results.
# For repo 1 (minio): 1 or 2 full backups.
# For repo 2 (sftp): 1 or 2 full backups and 1 diff backup.
# For repo 3 (sftp): 1 or 2 full backups.
# In this script only 1 full backup is created,
# but in the general pipeline (during makefile),
# this script is launched in two services (backup-ssh and baclup_alpine-ssh),
Expand All @@ -33,7 +38,8 @@ cnt_diff_repo_2=$(echo "${data_repo_2}" | grep 'diff backup' | wc -l)
# See https://github.com/pgbackrest/pgbackrest/blob/e699402f99f70819bd922eb6150fbe1b837eca0d/src/command/expire/expire.c#L192-L194
if ([ "${cnt_full_repo_1}" -eq "1" ] || [ "${cnt_full_repo_1}" -eq "2" ]) && \
([ "${cnt_full_repo_2}" -eq "1" ] || [ "${cnt_full_repo_2}" -eq "2" ]) && \
[ "${cnt_diff_repo_2}" -eq "1" ]
[ "${cnt_diff_repo_2}" -eq "1" ] && \
([ "${cnt_full_repo_3}" -eq "1" ] || [ "${cnt_full_repo_3}" -eq "2" ])
then
echo "[INFO] all tests passed"
exit 0
Expand All @@ -44,5 +50,7 @@ else
echo "[ERROR] full backup in repo 2: ${cnt_full_repo_2}, valid values: 1 or 2"
echo "[ERROR] diff backup in repo 2: ${cnt_diff_repo_2}, valid value: 1"
echo "${data_repo_2}"
echo "[ERROR] full backup in repo 3: ${cnt_full_repo_3}, valid values: 1 or 2"
echo "${data_repo_3}"
exit 1
fi
2 changes: 1 addition & 1 deletion e2e_tests/conf/backup/backup_prepare-tls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e

# Add hosts to known_hosts.
# Necessary for pgBackRest to work correctly over sftp.
ssh-keyscan -t rsa -p 2222 sftp >> ~/.ssh/known_hosts
ssh-keyscan -t rsa -p 2222 sftp-rsa >> ~/.ssh/known_hosts

# Run pgBackRest test commands.
pgbackrest stanza-create --stanza demo
Expand Down
17 changes: 14 additions & 3 deletions e2e_tests/conf/pg/pg_pgbackrest-ssh.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,25 @@ repo1-storage-port=443
repo1-storage-verify-tls=n
repo1-retention-diff=2
repo1-retention-full=2
# Repo 2 options (sftp).
# Repo 2 options (sftp rsa).
repo2-path=/var/lib/pgbackrest
repo2-sftp-host=sftp
repo2-sftp-host=sftp-rsa
repo2-sftp-host-port=2222
repo2-sftp-host-key-hash-type=sha1
repo2-sftp-host-user=pgbackrest
repo2-sftp-private-key-file=/var/lib/postgresql/.ssh/id_rsa_sftp
repo2-sftp-public-key-file=/var/lib/postgresql/.ssh/id_rsa_sftp.pub
repo2-type=sftp
repo2-retention-full=2
repo2-retention-diff=2
repo2-retention-diff=2
# Repo 3 options (sftp ed25519).
repo3-path=/tmp/demo
repo3-sftp-host=sftp-ed25519
repo3-sftp-host-port=2222
repo3-sftp-host-key-hash-type=sha256
repo3-sftp-host-user=pgbackrest
repo3-sftp-private-key-file=/var/lib/postgresql/.ssh/id_ed25519_sftp
repo3-sftp-public-key-file=/var/lib/postgresql/.ssh/id_ed25519_sftp.pub
repo3-type=sftp
repo3-retention-full=2
repo3-retention-diff=2
2 changes: 1 addition & 1 deletion e2e_tests/conf/pg/pg_pgbackrest-tls.conf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ repo2-retention-full=2
repo2-retention-diff=2
# Repo 3 options (sftp).
repo3-path=/var/lib/pgbackrest
repo3-sftp-host=sftp
repo3-sftp-host=sftp-rsa
repo3-sftp-host-port=2222
repo3-sftp-host-key-hash-type=sha1
repo3-sftp-host-user=pgbackrest
Expand Down
3 changes: 2 additions & 1 deletion e2e_tests/conf/pg/pg_prepare-ssh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ PG_DATA="/var/lib/postgresql/${PG_VERSION}/${PG_CLUSTER}"

# Add host to known_hosts.
# Necessary for pgBackRest to work correctly over sftp.
ssh-keyscan -t rsa -p 2222 sftp > ~/.ssh/known_hosts
ssh-keyscan -t rsa -p 2222 sftp-rsa > ~/.ssh/known_hosts
ssh-keyscan -t ed25519 -p 2222 sftp-ed25519 >> ~/.ssh/known_hosts

# Start postgres.
pg_ctlcluster ${PG_VERSION} ${PG_CLUSTER} start --foreground
2 changes: 1 addition & 1 deletion e2e_tests/conf/pg/pg_prepare-tls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ PG_DATA="/var/lib/postgresql/${PG_VERSION}/${PG_CLUSTER}"

# Add host to known_hosts.
# Necessary for pgBackRest to work correctly over sftp.
ssh-keyscan -t rsa -p 2222 sftp > ~/.ssh/known_hosts
ssh-keyscan -t rsa -p 2222 sftp-rsa > ~/.ssh/known_hosts

# Start postgres.
pg_ctlcluster ${PG_VERSION} ${PG_CLUSTER} start --foreground
3 changes: 2 additions & 1 deletion e2e_tests/conf/sftp/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ARG BACKREST_VERSION="2.53"

FROM pgbackrest:${BACKREST_VERSION}
ARG CONTAINER_TYPE="rsa"
RUN apt-get update -y \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
apt-utils \
Expand All @@ -17,5 +18,5 @@ RUN apt-get update -y \
&& rm -rf /var/lib/apt/lists/*
COPY --chmod=755 --chown=${BACKREST_USER}:${BACKREST_GROUP} ./conf/sftp/sftp_prepare.sh /home/${BACKREST_USER}/sftp_prepare.sh
COPY --chmod=600 --chown=${BACKREST_USER}:${BACKREST_GROUP} ./conf/ssh/authorized_keys /home/${BACKREST_USER}/.ssh/authorized_keys
COPY --chmod=700 --chown=${BACKREST_USER}:${BACKREST_GROUP} ./conf/sftp/sshd /home/${BACKREST_USER}/sshd
COPY --chmod=700 --chown=${BACKREST_USER}:${BACKREST_GROUP} ./conf/sftp/sshd-${CONTAINER_TYPE} /home/${BACKREST_USER}/sshd
ENTRYPOINT ["/entrypoint.sh"]
2 changes: 1 addition & 1 deletion e2e_tests/conf/sftp/sftp_prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
set -e

# Start sshd.
/usr/sbin/sshd -f ~/sshd/sshd_config -D
/usr/sbin/sshd -f ~/sshd/sshd_config -D -e
7 changes: 7 additions & 0 deletions e2e_tests/conf/sftp/sshd-ed25519/ssh_host_ed25519_key
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
QyNTUxOQAAACBv8IOsxtMkAHv4mR7W2VY7wPsQNQjJU/sJBBkZ6ISHOQAAAIj45BIb+OQS
GwAAAAtzc2gtZWQyNTUxOQAAACBv8IOsxtMkAHv4mR7W2VY7wPsQNQjJU/sJBBkZ6ISHOQ
AAAEAmcuVKGB4JJYMqjvk4Vbngg7JysCpxrna8BPb6sXuIqm/wg6zG0yQAe/iZHtbZVjvA
+xA1CMlT+wkEGRnohIc5AAAAAAECAwQF
-----END OPENSSH PRIVATE KEY-----
1 change: 1 addition & 0 deletions e2e_tests/conf/sftp/sshd-ed25519/ssh_host_ed25519_key.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG/wg6zG0yQAe/iZHtbZVjvA+xA1CMlT+wkEGRnohIc5
79 changes: 79 additions & 0 deletions e2e_tests/conf/sftp/sshd-ed25519/sshd_config
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Package generated configuration file
# See the sshd_config(5) manpage for details

# What ports, IPs and protocols we listen for
Port 2222
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
# HostKeys for protocol version 2
HostKey /home/pgbackrest/sshd/ssh_host_ed25519_key

HostKeyAlgorithms ssh-ed25519
PubkeyAcceptedKeyTypes ssh-ed25519

# Logging
SyslogFacility AUTH
LogLevel INFO

# Authentication:
LoginGraceTime 120
PermitRootLogin no
StrictModes yes

PubkeyAuthentication yes
AuthorizedKeysFile %h/.ssh/authorized_keys

# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# similar for protocol version 2
HostbasedAuthentication no
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes

# To enable empty passwords, change to yes (NOT RECOMMENDED)
PermitEmptyPasswords no

# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no

# Change to no to disable tunnelled clear text passwords
PasswordAuthentication no

# Kerberos options
#KerberosAuthentication no
#KerberosGetAFSToken no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

X11Forwarding no
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no

#MaxStartups 10:30:60
#Banner /etc/issue.net

# Allow client to pass locale environment variables
AcceptEnv LANG LC_*

Subsystem sftp internal-sftp

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM no
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions e2e_tests/conf/ssh/authorized_keys
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCjABaUr0CGkCEX7gSrlQZzRz1dOSPv4MQrQXXk7esmiNJpWnKHCzJiGO/wJfO53lHA9WvYJkTcNK2WqRBnYS0pOysUVX9UyBEmi00ZxHaSP1mgFJII0oYx8JzgzajbYNPoP52lzB1Y3uqMBCBkJsQZImI4t0l0K0FPW1DybCLx5My73rAahP5gpfX6UgqiscE/M13gRIsLoFN0bBjktH3xu2wZnpakPc2+IdqfICKs2fjYZhmMnTnz7kM8pGUh0cwvrwt4cfdgcHye9KDujszBDdhYpIW2/EuiS0eJBsNWrG+P+zO032j5YbcbxX/yHLxQJ+/M/XoigCgGrXujMvF/O2YTLI424fnVEYoQuyPu6sUhyd5gffIV/zQ/+PP5UaRPMdGschOdxdHMX/lxkKuJTYncdO+uekbVfql6BjS5SZ7vtTFfAwvQSyxo0yY9fFi6PFQonr2lAalpjT9w4ukMgIsiJlhC+XPJ+IUEcJHpRt+Nt2ur4P/XDSFv7YHpJLFm4fpueYfJ6L8phU5OV9WloPm8W5yUIP1UuwcIIhMx64RuJja1/QjQjJTftt3aLh1ew1JAAF21x5sI47pSqlD8fah6DUvFk1G7g1dazw4xAoXi0R5rXH4oOOoPZgAWzwiAUcrt1DGBjpAnopN7rtU3/dAW3PMUA5vjDfvLYzNJUw==
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCu5h9AmauyyK3xTEw4TeyzIHt2t02hzecFhD9wsQUMLhJAklzTR8+YHh7FNjvJo+LFJBrO8js+f4UKkPUjhdjb27JMsRHioYK36cWYwux/GCx2EcRIrFc5JIY4HYUesWW5viFY3QTjn7R3Ds67I1HaCexHnAFX9ztZa2EuneU0B80T8fVyMPFBb1jog8VPdK/YthAx4coJV12fS0hqUSWJr2s2PG6di2yasTfZma8CP9vikZa0w1kJ92ZBYm0V8RaRfXhURt77JuT81iOVh3dWOthIzUaDBq2lJWZJ0itxnq4Ku2M6o3EASdcH/jtFvk2+1mHtRpilxi6bAaklLofmpEZJ4NmB0spKiAdTGMlMsc2Cb42bMjxcz3SQOvUYEtNUBPY1Esaj6TgS6Aa5f5THv1+MebOG1CJUdPFbVUKJIXKGhc1Ue71ty342mKpuqeksz1v/jRcxEvJKcc1INK1twkZH35E8r7zRKD1RXGBU7B9xBhFjQ+BNi9eesSvzT4bNCpgwaMwACMIOon4UEyZ5L05quhqF10kJO0OurclObj8AW6wTbLyCQttseM9V63jyyAulkkt/fVLzQzUMfOxNilzsIO076nNU4dYmvO24+iE1/CyR6/HZNXEBDfaC0Js3jxHDrQH0F42I1OPvVuQv4l/ycgjBtRokVHFGDaoQVQ==
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKUrrxkSfjHbXgcQkgG0OhHHnaRYt90/nSC9qoiJ6yNC
7 changes: 7 additions & 0 deletions e2e_tests/conf/ssh/id_ed25519_sftp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
QyNTUxOQAAACClK68ZEn4x214HEJIBtDoRx52kWLfdP50gvaqIiesjQgAAAIiVoSirlaEo
qwAAAAtzc2gtZWQyNTUxOQAAACClK68ZEn4x214HEJIBtDoRx52kWLfdP50gvaqIiesjQg
AAAEA4uARuoGBAdx7o1kN3UyG3AlBuqyAqIm09pZK9jGZTmqUrrxkSfjHbXgcQkgG0OhHH
naRYt90/nSC9qoiJ6yNCAAAAAAECAwQF
-----END OPENSSH PRIVATE KEY-----
1 change: 1 addition & 0 deletions e2e_tests/conf/ssh/id_ed25519_sftp.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKUrrxkSfjHbXgcQkgG0OhHHnaRYt90/nSC9qoiJ6yNC
10 changes: 8 additions & 2 deletions e2e_tests/docker-compose.backup-ssh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ services:
- "./conf/ssh/id_rsa:/home/pgbackrest/.ssh/id_rsa"
- "./conf/ssh/id_rsa_sftp:/home/pgbackrest/.ssh/id_rsa_sftp"
- "./conf/ssh/id_rsa_sftp.pub:/home/pgbackrest/.ssh/id_rsa_sftp.pub"
- "./conf/ssh/id_ed25519_sftp:/home/pgbackrest/.ssh/id_ed25519_sftp"
- "./conf/ssh/id_ed25519_sftp.pub:/home/pgbackrest/.ssh/id_ed25519_sftp.pub"
- "./conf/backup/backup_prepare-ssh.sh:/home/pgbackrest/backup_prepare.sh"
- "./conf/backup/backup_pgbackrest-ssh.conf:/etc/pgbackrest/pgbackrest.conf"
command: /home/pgbackrest/backup_prepare.sh
Expand All @@ -20,7 +22,8 @@ services:
- nginx
- createbucket
- pg-ssh
- sftp
- sftp-rsa
- sftp-ed25519
networks:
- ssh

Expand All @@ -32,6 +35,8 @@ services:
- "./conf/ssh/id_rsa:/home/pgbackrest/.ssh/id_rsa"
- "./conf/ssh/id_rsa_sftp:/home/pgbackrest/.ssh/id_rsa_sftp"
- "./conf/ssh/id_rsa_sftp.pub:/home/pgbackrest/.ssh/id_rsa_sftp.pub"
- "./conf/ssh/id_ed25519_sftp:/home/pgbackrest/.ssh/id_ed25519_sftp"
- "./conf/ssh/id_ed25519_sftp.pub:/home/pgbackrest/.ssh/id_ed25519_sftp.pub"
- "./conf/backup/backup_prepare-ssh.sh:/home/pgbackrest/backup_prepare.sh"
- "./conf/backup/backup_pgbackrest-ssh.conf:/etc/pgbackrest/pgbackrest.conf"
command: /home/pgbackrest/backup_prepare.sh
Expand All @@ -43,7 +48,8 @@ services:
- nginx
- createbucket
- pg-ssh
- sftp
- sftp-rsa
- sftp-ed25519
networks:
- ssh

Expand Down
4 changes: 2 additions & 2 deletions e2e_tests/docker-compose.backup-tls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ services:
- createbucket
- pg-tls
- backup_server-tls
- sftp
- sftp-rsa
networks:
- tls

Expand All @@ -69,7 +69,7 @@ services:
- createbucket
- pg-tls
- backup_server-tls
- sftp
- sftp-rsa
networks:
- tls

Expand Down
5 changes: 3 additions & 2 deletions e2e_tests/docker-compose.pg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ services:
- minio
- nginx
- createbucket
- sftp
- sftp-rsa
- sftp-ed25519
networks:
- ssh

Expand All @@ -46,7 +47,7 @@ services:
- minio
- nginx
- createbucket
- sftp
- sftp-rsa
networks:
- tls

Expand Down
Loading

0 comments on commit 2c38404

Please sign in to comment.