From 52b36bc651001d0403d9fc87ce7c05067e226715 Mon Sep 17 00:00:00 2001 From: Florian Sesser Date: Fri, 2 Jan 2015 17:04:40 +0100 Subject: [PATCH] Retain ownership and permissions when copying postgres data at first run I ran into a problem where Postgres complained about incorrect permissions. This fixed it, and generally is a good idea here IMHO. --- scripts/first_run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/first_run.sh b/scripts/first_run.sh index 253f2ab..a9ff89a 100644 --- a/scripts/first_run.sh +++ b/scripts/first_run.sh @@ -13,7 +13,7 @@ pre_start_action() { echo "Initializing PostgreSQL at $DATA_DIR" # Copy the data that we generated within the container to the empty DATA_DIR. - cp -R /var/lib/postgresql/9.3/main/* $DATA_DIR + cp -aR /var/lib/postgresql/9.3/main/* $DATA_DIR fi # Ensure postgres owns the DATA_DIR