From 15d143b2329b727aca38ffa4588c67cf82b7fa53 Mon Sep 17 00:00:00 2001 From: quentinchampenois <26109239+Quentinchampenois@users.noreply.github.com> Date: Mon, 22 Jul 2024 18:14:11 +0200 Subject: [PATCH] fix(rake): Fix Restore dump command --- lib/tasks/restore_dump.rake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/tasks/restore_dump.rake b/lib/tasks/restore_dump.rake index 44043727..6b28ee0a 100644 --- a/lib/tasks/restore_dump.rake +++ b/lib/tasks/restore_dump.rake @@ -3,7 +3,7 @@ task :restore_dump do $stdout.puts "Path to dump file (/path/to/dump): " local_path = $stdin.gets.to_s.strip - dump = local_path[-1].split("/")[-1] - sh "docker cp '#{local_path}' decidim-app_database_1:'/tmp/#{dump}'" - sh "docker exec -it decidim-app_database_1 su postgres -c 'pg_restore -c -O -v -d osp_app /tmp/#{dump}'" + dump = local_path.split("/")[-1] + sh "docker cp '#{local_path}' decidim-cdc-database-1:'/tmp/#{dump}'" + sh "docker exec -it decidim-cdc-database-1 su postgres -c 'pg_restore -c -O -v -x --no-owner -d osp_app /tmp/#{dump}'" end