Skip to content

Commit

Permalink
fix(rake): Fix Restore dump command
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentinchampenois committed Jul 22, 2024
1 parent d145f43 commit 15d143b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/tasks/restore_dump.rake
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 15d143b

Please sign in to comment.