Last active
June 14, 2019 12:10
-
-
Save tejastank/c63d5a5dd8d848d1c06c30919fb1ba83 to your computer and use it in GitHub Desktop.
Window Odoo PostgreSQL Database Backup And Restore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Snippetbucket, odoo backup for window platform | |
#SnippetBucket.com for Enterprise Business & Integrated Automation | |
#email: [email protected] | |
Here's the steps to do that on Windows 7: | |
Backup: | |
Step 1: cd into Postgres bin directory so you can run pg_dump.exe | |
command: $ cd \Program Files\PostgreSQL\9.3\bin | |
Step 2: backup a specific database | |
command: $ pg_dump.exe --username=postgres -C my_database > c:/my_database.sql | |
Restore: | |
Step 1: Go to exe Postgresql directory | |
command: $ cd \Program Files\PostgreSQL\9.3\bin | |
Step 2: Create Database | |
command: psql.exe -d postgres -U postgres | |
command: CREATE DATABASE database_name_as_in_pevious_system WITH TEMPLATE = template0 ENCODING = 'UTF8'; | |
command: \q | |
Step 3: Restore backup dump to new database | |
command: $ cd \Program Files\PostgreSQL\9.3\bin | |
command: psql.exe database_name_as_in_pevious_system < c:/my_database.sql | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment