From 943649bf80423f37396def398cf41d5805c7a8c9 Mon Sep 17 00:00:00 2001 From: Michael Polidori Date: Wed, 2 Oct 2024 12:30:51 -0400 Subject: [PATCH] Fix resource migration command --- db/migration/upgrade_databases.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migration/upgrade_databases.sh b/db/migration/upgrade_databases.sh index 9758c7b..76648f2 100755 --- a/db/migration/upgrade_databases.sh +++ b/db/migration/upgrade_databases.sh @@ -90,7 +90,7 @@ echo "" docker cp ${CKAN_DATA_BACKUP_FILE} ${CKAN_SERVICE_ID}:/${CKAN_DATA_BACKUP_FILE} -docker-compose ${COMPOSE_FILES} exec -T ${CKAN_SERVICE} bash -c "tar -xzf /ckan_data.tar.gz -C /data && cp -r /data/* /var/lib/ckan/data/ && chown -R ckan:ckan /var/lib/ckan/data" +docker-compose ${COMPOSE_FILES} exec -T ${CKAN_SERVICE} bash -c "mkdir -p /var/lib/ckan/data && tar -xzf /ckan_data.tar.gz --strip-components=1 -C /var/lib/ckan/data && chown -R ckan:ckan /var/lib/ckan/data" echo "" echo "### Data files restored to CKAN."