Skip to content

Commit

Permalink
initial pitr draft (#2753)
Browse files Browse the repository at this point in the history
* initial pitr draft

includes changes to the structure of the sidebar

* Update use-timescale/backup-restore/index.md

Co-authored-by: Bryan Clark <[email protected]>
Signed-off-by: Grant Godeke <[email protected]>

* Apply suggestions from code review

Co-authored-by: Solar Olugebefola <[email protected]>
Signed-off-by: Grant Godeke <[email protected]>

* incorporate feedback

* fix vale error

* vale pt2

---------

Signed-off-by: Grant Godeke <[email protected]>
Signed-off-by: Bryan Clark <[email protected]>
Co-authored-by: Bryan Clark <[email protected]>
Co-authored-by: Solar Olugebefola <[email protected]>
  • Loading branch information
3 people authored Nov 2, 2023
1 parent 79d5bcd commit ba234dd
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 3 deletions.
12 changes: 12 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
27 changes: 27 additions & 0 deletions use-timescale/backup-restore/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
title: Backup and restore
excerpt: Understand how backups, restores, and PITR work in Timescale
products: [cloud]
keywords: [backup, restore, pitr, point-in-time recovery]
tags: [backup, restore, recovery, pitr]
cloud_ui:
path:
- [services, :serviceId, operations, management]
---

# Backup, restore, and PITR

Timescale automatically handles backup and restore for all
services using the `pgBackRest` tool. You don't need to perform
backups for your Timescale service manually.

Timescale also offers self-initiated point-in-time recovery (PITR) in the console.
This allows you to fork a service to any point in the last 3 days in a
fork of the service being restored.

* [Backup and restore][backup-recovery] in Timescale
* Performing a [point-in-time recovery][pitr] in Timescale

[backup-recovery]: /use-timescale/:currentVersion:/backup-restore/backup-restore-cloud/
[pitr]: /use-timescale/:currentVersion:/backup-restore/pitr/

48 changes: 48 additions & 0 deletions use-timescale/backup-restore/point-in-time-recovery.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: Point-in-time recovery
excerpt: Learn how to restore your service to a previous point in time
products: [cloud]
keywords: [restore, recovery, pitr]
tags: [recovery, restore, pitr]
---

# Point-in-time recovery

Point-in-time recovery allows you to recover your database from a destructive
or unwanted action or change. Timescale allows you to perform a point-in-time
recovery of your service to any point in the last 3 days. Initiating a
point-in-time recovery of your service creates a fork of your service that
matches the state of your database at the specified time of recovery. The
original service stays untouched to avoid losing data created since the
time of recovery.

Since the point-in-time recovery is done in a fork, to migrate your
application to the point of recovery, switch out the connection
strings in your application to use the fork. The provision time for the
recovery fork is typically less than twenty minutes, but can take longer
depending on the amount of WAL to be replayed.

To avoid paying for compute for the recovery fork and the original service, you
can pause the original to only pay storage costs.

<Procedure>

### Initiating a point-in-time recovery (PITR)

1. In the Timescale console, from the `Services` list, ensure the service
you want to PITR has a status of `Running` or `Paused`.
1. Navigate to the `Operations` tab.
1. In the `Service management` section, click `Create recovery fork`. In the
creation page, select the time you would like to recover to, ensuring the
correct time zone (UTC offset).
1. [](#)<Optional />You can also add an HA replica, change the compute, and
add a connection pooler as part of this process. It is recommended to match
the same configuration you had at the point you want to recover to.
1. Confirm by clicking `Create recovery fork`. A fork of the service is
created to the point-in-time specified.
1. The recovered service shows in the `Services` dashboard with a label stating
which service it has been forked from.
1. If you would like to use your application to use the recovered fork, ensure
you update your connection strings to the fork throughout your app.

</Procedure>
17 changes: 14 additions & 3 deletions use-timescale/page-index/page-index.js
Original file line number Diff line number Diff line change
Expand Up @@ -720,9 +720,20 @@ module.exports = [
]
},
{
title: "Backup and restore",
href: "backup-restore-cloud",
excerpt: "Timescale backup and restore",
title: "Backup, restore, and PITR",
href: "backup-restore",
children: [
{
title: "Backup and restore",
href: "backup-restore-cloud",
excerpt: "Timescale backup and restore",
},
{
title: "Point-in-time recovery",
href: "pitr",
excerpt: "PITR on Timescale services"
}
]
},
{
title: "User-defined actions",
Expand Down

0 comments on commit ba234dd

Please sign in to comment.