From 59ac24d30db0661c557482c932038d0d5c6cbd20 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Mon, 6 Jan 2025 17:24:43 +0100 Subject: [PATCH] fix: doc: correct some mistakes around script to use ``pgm cp`` for restoring database --- README.org | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.org b/README.org index af9c6a6..40ea8a2 100644 --- a/README.org +++ b/README.org @@ -1107,8 +1107,10 @@ Récupération des derniers dumps: #+begin_src sh compose --debug up postgres -for dump in /srv/datastore/data/postgres/var/backups/pg; do - pgm cp "$dump" postgres@"${dump%%.*}" +for dump in /srv/datastore/data/postgres/var/backups/pg/*; do + dbname=${dump##*/} + dbname=${dbname%%.*} + pgm cp "$dump" postgres@"${dbname}" done #+end_src