You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: Testing.md
+35-35
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,20 @@
1
1
## Testing Backup and Restore
2
-
To test the project we need to simulate running a live system , taking it down and restoring the system. For this test we have two Docker Compose files for the system `docker-compose-live.yaml` and `docker-compose-restore-test.yaml` in a real restore scenario we will only have on Docker Compose file as we expect the restore is being done on a separate instance. We also have separate files for Backup and Restore (`docker-compose-backup-service.yaml` and `docker-compose-restore-service.yaml`)
2
+
To test the project we need to simulate running a live system , taking it down and restoring the system. For this test we have two Docker Compose files for the system `docker-compose-live.yaml` and `docker-compose-live-two.yaml` in a real restore scenario we will only have on Docker Compose file as we expect the restore is being done on a separate instance. We also have separate files for Backup and Restore (`docker-compose-backup-service.yaml` and `docker-compose-restore-service.yaml`)
3
3
Run:
4
4
5
-
```./start-live-system.sh```
5
+
```./start-live.sh```
6
6
This will start the example live system;
7
7
Wait for > 5 minutes for the first backup to happen. You can confirm by running
8
8
9
-
`docker logs -f live-system-backup-1`
9
+
`docker logs -f live-backup-1`
10
10
11
11
You should see logs similar to:
12
12
13
13
```
14
14
crond 4.5 dillon's cron daemon, started with loglevel notice
@@ -62,7 +62,7 @@ crond 4.5 dillon's cron daemon, started with loglevel notice
62
62
63
63
### Validate database restore
64
64
65
-
```docker exec -it live-system-mariadb-1 bash```
65
+
```docker exec -it live-mariadb-1 bash```
66
66
67
67
```mysql -uroot -pmy-secret-pw```
68
68
@@ -85,15 +85,15 @@ crond 4.5 dillon's cron daemon, started with loglevel notice
85
85
86
86
Stop the live system to avoid conflicts as the backup service may try to backup the restored system (The backup and restore services are not intended to run on the same system)
87
87
88
-
```./stop-live-system.sh```
88
+
```./stop-live.sh```
89
89
90
90
Run the restore
91
91
92
-
```./restore-backup.sh```
92
+
```./start-live-two-with-restore.sh```
93
93
94
94
Check the restore logs
95
95
96
-
```docker logs -f restore-test-restore-1```
96
+
```docker logs -f live-two-restore-1```
97
97
98
98
You should see logs similar to:
99
99
@@ -102,28 +102,28 @@ You should see logs similar to:
@@ -263,7 +263,7 @@ You should see logs similar to:
263
263
```
264
264
You can now check the databases for restored data, for example
265
265
266
-
```docker exec -it restore-test-mariadb-1 bash``
266
+
```docker exec -it live-two-mariadb-1 bash``
267
267
268
268
```mysql -uroot -pmy-secret-pw```
269
269
@@ -285,9 +285,9 @@ You should see logs similar to:
285
285
```
286
286
### Validate volume restore
287
287
288
-
We have two services to validate that volumes are restored correctly. see `web` and `web-2` in the `docker-compose-restore-test.yaml` file. When the `docker-compose-restore-service.yaml` file is used the `web` and `web-2` will wait for restore to complete before starting. The service then run ls on the restored mounts to confirm that the restore happened run;
288
+
We have two services to validate that volumes are restored correctly. see `web` and `web-2` in the `docker-compose-live-two.yaml` file. When the `docker-compose-restore-service.yaml` file is used the `web` and `web-2` will wait for restore to complete before starting. The service then run ls on the restored mounts to confirm that the restore happened run;
0 commit comments