Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
www-test
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Silvia Bindelli
www-test
Commits
a0e7d284
Commit
a0e7d284
authored
Jul 14, 2014
by
Riccardo Padovani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated scripts, moved to scripts folder
parent
8ca68635
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
scripts/scrub.sql
scripts/scrub.sql
+0
-0
scripts/sql_scrub_dump.sh
scripts/sql_scrub_dump.sh
+7
-7
No files found.
scr
um
b.sql
→
scr
ipts/scru
b.sql
View file @
a0e7d284
File moved
s
ql_scrum
b_dump.sh
→
s
cripts/sql_scru
b_dump.sh
View file @
a0e7d284
...
@@ -32,19 +32,19 @@ dump_input=${1}
...
@@ -32,19 +32,19 @@ dump_input=${1}
dump_output
=
${
2
}
dump_output
=
${
2
}
# Destroy previous temp database and create a new one
# Destroy previous temp database and create a new one
dropdb
--if-exists
$local_db
dropdb
--if-exists
"
$local_db
"
createdb
$local_db
createdb
"
$local_db
"
# Extract the file and import in psql
# Extract the file and import in psql
tar
-xOvf
$dumb_input
| psql
$local_db
tar
-xOvf
"
$dump_input
"
| psql
"
$local_db
"
# Scrub the database
# Scrub the database
psql
$local_db
< scrum
b.sql
psql
"
$local_db
"
< scru
b.sql
# Export the db
# Export the db
pg_dump
$local_db
>
scrubbed-db.sql
pg_dump
"
$local_db
"
>
scrubbed-db.sql
tar
-cvzf
$dump_output
scrubbed-db.sql
tar
-cvzf
"
$dump_output
"
scrubbed-db.sql
# Removed temporary files
# Removed temporary files
dropdb
--if-exists
$local_db
dropdb
--if-exists
"
$local_db
"
rm
-f
scrubbed-db.sql
rm
-f
scrubbed-db.sql
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment