diff --git a/infrastrucure/docker/image/resources/backup-pg-functions.sh b/infrastrucure/docker/image/resources/backup-pg-functions.sh new file mode 100644 index 0000000..780b38c --- /dev/null +++ b/infrastrucure/docker/image/resources/backup-pg-functions.sh @@ -0,0 +1,3 @@ +function init-role-repo() { + restic -r ${RESTIC_REPOSITORY}/pg-role -v init +} diff --git a/infrastrucure/docker/image/resources/install.sh b/infrastrucure/docker/image/resources/install.sh index 1256d3b..9f77101 100755 --- a/infrastrucure/docker/image/resources/install.sh +++ b/infrastrucure/docker/image/resources/install.sh @@ -10,10 +10,5 @@ apt-get -qqy install wget postgresql-client-13 restic > /dev/null; update-ca-certificates -install -m 0700 /tmp/entrypoint.sh / - install -m 0400 /tmp/functions.sh /usr/local/lib/ - -install -m 0700 /tmp/init.sh /usr/local/bin/ -install -m 0700 /tmp/backup.sh /usr/local/bin/ -install -m 0700 /tmp/restore.sh /usr/local/bin/ +install -m 0400 /tmp/backup-pg-functions.sh /usr/local/lib/ diff --git a/infrastrucure/docker/test/serverspec.edn b/infrastrucure/docker/test/serverspec.edn index 34f3270..5870ccf 100644 --- a/infrastrucure/docker/test/serverspec.edn +++ b/infrastrucure/docker/test/serverspec.edn @@ -2,6 +2,4 @@ {:name "postgresql-client-13"}] :file [{:path "/entrypoint.sh" :mod "700"} {:path "/usr/local/lib/functions.sh" :mod "400"} - {:path "/usr/local/bin/init.sh" :mod "700"} - {:path "/usr/local/bin/backup.sh" :mod "700"} - {:path "/usr/local/bin/restore.sh" :mod "700"}]} + {:path "/usr/local/lib/backup-pg-functions.sh" :mod "400"}]}