Skip to content

Commit 6d52c99

Browse files
Sync docs from Discourse (#606)
Co-authored-by: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com>
1 parent bfd6442 commit 6d52c99

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

docs/how-to/h-restore-backup.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,15 @@ To restore a backup that was made from the a *different* cluster, (i.e. cluster
1515
- Access to S3 storage
1616
- [Have configured settings for S3 storage](/t/charmed-mysql-k8s-how-to-configure-s3/9651)
1717
- [Have existing backups in your S3-storage](/t/charmed-mysql-k8s-how-to-create-and-list-backups/9653)
18+
- Point-in-time recovery requires the following MySQL K8s charm revisions:
19+
* 248+ for arm64
20+
* 249+ for amd64
21+
1822

1923
## Summary
2024

2125
* [List backups](#list-backups)
26+
* [Point-in-time recovery](#point-in-time-recovery)
2227
* [Restore backup](#restore-backup)
2328

2429
---
@@ -38,11 +43,29 @@ This should show your available backups
3843
YYYY-MM-DDTHH:MM:SSZ | physical | finished
3944
```
4045

46+
## Point-in-time recovery
47+
48+
Point-in-time recovery (PITR) is a MySQL K8s feature that enables restorations to the database state at specific points in time. The feature is enabled by default when there’s a working relation with S3 storage.
49+
4150
## Restore backup
4251

4352
To restore a backup from that list, run the `restore` command and pass the `backup-id` to restore:
4453
```shell
4554
juju run mysql-k8s/leader restore backup-id=YYYY-MM-DDTHH:MM:SSZ
4655
```
4756

48-
Your restore will then be in progress.
57+
Your restore will then be in progress.
58+
59+
However, if the user needs to restore to a specific point in time between different backups (e.g. to restore only specific transactions made between those backups), they can use the restore-to-time parameter to pass a timestamp related to the moment they want to restore.
60+
61+
```shell
62+
juju run mysql-k8s/leader restore restore-to-time="YYYY-MM-DD HH:MM:SS"
63+
```
64+
65+
Your restore will then be in progress.
66+
67+
It’s also possible to restore to the latest point from a specific timeline by passing the ID of a backup taken on that timeline and restore-to-time=latest when requesting a restore:
68+
69+
```shell
70+
juju run mysql-k8s/leader restore restore-to-time=latest
71+
```

0 commit comments

Comments
 (0)