diff --git a/lib/tasks/restore_dump.rake b/lib/tasks/restore_dump.rake index 4404372..6b28ee0 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