Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
DZDTools
CoDaBuddy
Commits
04d62b56
Commit
04d62b56
authored
Feb 01, 2022
by
Tim Bleimehl
🤸🏼
Browse files
wip
parent
c9a52d4a
Changes
1
Hide whitespace changes
Inline
Side-by-side
DEV_NOTES.md
View file @
04d62b56
...
...
@@ -2,16 +2,20 @@
```
bash
docker
exec
postgres /usr/bin/psql
-Atx
postgresql://postgres:mysupersavepw@localhost
-c
"CREATE DATABASE coda_ps_test;"
&&
/usr/bin/psql
-Atx
postgresql://postgres:mysupersavepw@localhost
-c
"
\
docker
exec
postgres /usr/bin/psql
-Atx
postgresql://postgres:mysupersavepw@localhost
-c
"CREATE DATABASE coda_ps_test;"
&&
/usr/bin/psql
-Atx
postgresql://postgres:mysupersavepw@localhost
/coda_ps_test
-c
"
\
BEGIN;
\
create schema coda_ps_test_scheme;
\
CREATE TABLE IF NOT EXISTS coda_ps_test_scheme.my_table(id integer PRIMARY KEY, firstname VARCHAR(32));
\
INSERT INTO coda_ps_test_scheme.my_table(id,firstname) VALUES (1,'Anna');
\
INSERT INTO coda_ps_test_scheme.my_table(id,firstname) VALUES (2,'Thomas');
\
INSERT INTO coda_ps_test_scheme.my_table(id,firstname) VALUES (1,'Anna
2
');
\
INSERT INTO coda_ps_test_scheme.my_table(id,firstname) VALUES (2,'Thomas
2
');
\
commit;"
```
## check data
```
bash
docker
exec
postgres /usr/bin/psql
-Atx
postgresql://postgres:mysupersavepw@localhost/coda_ps_test
-c
"SELECT * FROM coda_ps_test_scheme.my_table;"
```
# Run Backupnow test
## docker
...
...
@@ -26,3 +30,9 @@ python3 CoDaBackup/cli.py backup now --mode=docker --container-identifier=mysql
```
bash
python3 CoDaBackup/cli.py backup now
--mode
=
kubernetes
--container-identifier
=
my-namespace/postgres01
--database-type
=
postgres
--database-host
=
127.0.0.1
--database-user
=
postgres
--database-names
=
coda_ps_test
```
# restore
```
bash
python3 CoDaBackup/cli.py restore kubernetes
--namespace
=
"my-namespace"
--backup-name
=
"postgresbackup_2022-01-28_10-23-46.sql"
--workload-name
=
"postgres01"
--database-name
=
"coda_ps_test"
```
\ No newline at end of file
Write
Preview
Supports
Markdown
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