Skip to content

Commit e0b9620

Browse files
billy-the-fishharkishenarajkumar
authored
Milestone4-update-migration-guides (timescale#3263)
New migration docs for migration with downtime and live. Co-authored-by: Harkishen Singh <[email protected]> Co-authored-by: Arunprasad Rajkumar <[email protected]>
1 parent ca4a392 commit e0b9620

File tree

55 files changed

+2270
-348
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2270
-348
lines changed

.data/redirects.js

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1348,7 +1348,31 @@ const redirector = new ThreeOhOneRedirector({
13481348
"https://docs.timescale.com/timescaledb/latest/how-to-guides/write-data/"
13491349
)
13501350
.add("/main", "https://docs.timescale.com/timescaledb/latest/")
1351-
.add(
1351+
.add(
1352+
"/migrate/latest/live-migration/live-migration-from-postgres/",
1353+
"https://docs.timescale.com/migrate/latest/live-migration"
1354+
)
1355+
.add(
1356+
"/migrate/latest/live-migration/live-migration-from-timescaledb",
1357+
"https://docs.timescale.com/migrate/latest/live-migration"
1358+
)
1359+
.add(
1360+
"/migrate/latest/live-migration/live-migration-faq",
1361+
"https://docs.timescale.com/migrate/latest/live-migration"
1362+
)
1363+
.add(
1364+
"/migrate/latest/playbooks/rds-timescale-pg-dump",
1365+
"https://docs.timescale.com/migrate/latest/pg-dump-and-restore"
1366+
)
1367+
.add(
1368+
"/migrate/latest/playbooks/rds-timescale-live-migration",
1369+
"https://docs.timescale.com/migrate/latest/live-migration"
1370+
)
1371+
.add(
1372+
"/migrate/latest/playbooks/multi-node-to-timescale-service",
1373+
"https://docs.timescale.com/migrate/latest/live-migration"
1374+
)
1375+
.add(
13521376
"/mst/latest/create-a-service",
13531377
"https://docs.timescale.com/mst/latest/about-mst"
13541378
)
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
---
2+
title: Verb \<what the user will do>
3+
excerpt: SEO friendly explanation of why the user will do it
4+
keywords: [noun, verb, ]
5+
tags: [noun, noun]
6+
---
7+
<!-- Add any imports here -->
8+
import Skip from "versionContent/_partials/_selfhosted_cta.mdx";
9+
import SelfHostedDebianBased from "versionContent/_partials/_install-self-hosted-debian-based.mdx";
10+
11+
# Verb \<what the user will do>
12+
13+
One or two sentences explaining how something works and why you would follow the procedure
14+
in this page
15+
16+
Either and architecture diagram showing how the infrastructure works:
17+
18+
<img class="main-content__illustration"
19+
src="https://assets.timescale.com/docs/images/tsc-vpc-architecture.svg"
20+
alt="The AWS Security Groups dashboard"/>
21+
22+
Or a [workflow diagram][workflow-diagram] explaining the choices to be made or the user interaction
23+
implemented in the page.
24+
25+
If necessary, a paragraph or two explaining more about how things work.
26+
27+
This section shows you how to:
28+
29+
* [Verb \<what the user will do>](#verb-what-the-user-will-do)
30+
* [Verb \<what the user will do if the procedure is cut into logical sections>](#verb-what-the-user-will-do-if-the-procedure-is-cut-into-logical-sections)
31+
32+
## Prerequisites
33+
34+
In order to \<a couple of words that sound like the title> you need the following:
35+
36+
* A [Timescale Cloud service][create-a-service]
37+
* If you are using this template to write a new document, see some good doc examples:
38+
* [Create your first Timescale service][create-a-service]
39+
* [Secure your Timescale Service with VPC Peering and AWS PrivateLink][secure-vpc-aws]
40+
* [Install TimescaleDB on Linux][install-linux]
41+
* Read the [Google Developer Style Guide][gdsg]
42+
* ...
43+
44+
Notice the list items start with a capital letter, but do not end with a full stop.
45+
46+
## Verb \<what the user will do in this section>
47+
48+
Intro sentence. The title should explain what the user will do in this section.
49+
Use this sentence to either give a small explanation of the architecture or
50+
workflow, or just an intro sentence.
51+
52+
<Procedure>
53+
54+
1. **Do this**
55+
56+
Take care for spacing and indentation:
57+
```java
58+
// Maybe a code example
59+
```
60+
1. **Then that**
61+
1. Could be.
62+
1. Substeps.
63+
1. Using autonumbering.
64+
1. **Until the doing is done**
65+
66+
You may need to add a sentence to explain what the user does in more detail:
67+
68+
```java
69+
// Maybe a code example
70+
```
71+
72+
You have \<what the user will do in this section>.
73+
74+
## Verb \<what the user will do if the procedure is cut into logical sections>
75+
76+
Intro sentence. This section shows how to use tabs to show multiple implementations
77+
of the same thing:
78+
79+
<Tabs label="Install TimescaleDB">
80+
81+
<Tab title="Platform, product or reason ">
82+
83+
1. **Do this**
84+
85+
Code example or procedure
86+
2. **Then that**
87+
88+
Code example or procedure
89+
</Tab>
90+
91+
<Tab title="Platform, product or reason">
92+
93+
<SelfHostedDebianBased />
94+
95+
</Tab>
96+
97+
</Tabs>
98+
99+
You have \<what the user will do in this section>.
100+
101+
<!-- Add links here as variables -->
102+
[workflow-diagram]: https://plantuml.com/activity-diagram-beta
103+
[create-a-service]: /getting-started/:currentVersion:/services
104+
[secure-vpc-aws]: /use-timescale/:currentVersion:/vpc/
105+
[install-linux]: /self-hosted/:currentVersion:/install/installation-linux/
106+
[gdsg]: https://developers.google.com/style/highlights
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
2+
## Create an intermediary EC2 Ubuntu instance
3+
<Procedure>
4+
5+
1. In [https://console.aws.amazon.com/rds/home#databases:][databases],
6+
select the RDS instance to migrate.
7+
1. Click `Actions` > `Set up EC2 connection`.
8+
Press `Create EC2 instance` and use the following settings:
9+
- **AMI**: Ubuntu Server.
10+
- **Key pair**: use an existing pair or create a new one that you will use to access the intermediary machine.
11+
- **VPC**: by default, this is the same as the database instance.
12+
- **Configure Storage**: adjust the volume to at least the size of RDS instance you are migrating from.
13+
You can reduce the space used by your data on Timescale Cloud using [data compression][data-compression].
14+
1. Click `Lauch instance`. AWS creates your EC2 instance, then click `Connect to instance` > `SSH client`.
15+
Follow the instructions to create the connection to your intermediary EC2 instance.
16+
17+
</Procedure>
18+
19+
## Install the psql client tools on the intermediary instance
20+
21+
<Procedure>
22+
23+
1. Connect to your intermediary EC2 instance. For example:
24+
```sh
25+
ssh -i "<key-pair>.pem" ubuntu@<EC2 instance's Public IPv4>
26+
```
27+
1. On your intermediary EC2 instance, install the PostgreSQL client.
28+
```sh
29+
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
30+
wget -qO- https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo tee /etc/apt/trusted.gpg.d/pgdg.asc &>/dev/null
31+
sudo apt update
32+
sudo apt install postgresql-client-16 -y # "postgresql-client-16" if your source DB is using PG 16.
33+
psql --version && pg_dump --version
34+
```
35+
36+
Keep this terminal open, you need it to connect to the RDS instance for migration.
37+
38+
</Procedure>
39+
40+
## Setup secure connectivity between your RDS and EC2 instances
41+
<Procedure>
42+
43+
1. In [https://console.aws.amazon.com/rds/home#databases:][databases],
44+
select the RDS instance to migrate.
45+
1. Scroll down to `Security group rules (1)` and select the `EC2 Security Group - Inbound` group. The
46+
`Security Groups (1)` window opens. Click the `Security group ID`, then click `Edit inbound rules`
47+
48+
<img class="main-content__illustration"
49+
src="https://assets.timescale.com/docs/images/migrate/rds-add-security-rule-to-ec2-instance.svg"
50+
alt="Create security group rule to enable RDS EC2 connection"/>
51+
52+
1. On your intermediary EC2 instance, get your local IP address:
53+
```sh
54+
ec2metadata --local-ipv4
55+
```
56+
Bear with me on this one, you need this IP address to enable access to your RDS instance,
57+
1. In `Edit inbound rules`, click `Add rule`, then create a `PostgreSQL`, `TCP` rule granting access
58+
to the local IP address for your EC2 instance (told you :-)). Then click `Save rules`.
59+
60+
<img class="main-content__illustration"
61+
src="https://assets.timescale.com/docs/images/migrate/rds-add-inbound-rule-for-ec2-instance.png"
62+
alt="Create security rule to enable RDS EC2 connection"/>
63+
64+
</Procedure>
65+
66+
## Test the connection between your RDS and EC2 instances
67+
<Procedure>
68+
69+
1. In [https://console.aws.amazon.com/rds/home#databases:][databases],
70+
select the RDS instance to migrate.
71+
1. On your intermediary EC2 instance, use the values of `Endpoint`, `Port`, `Master username`, and `DB name`
72+
to create the postgres connectivity string to the `SOURCE` variable.
73+
74+
<img class="main-content__illustration"
75+
src="https://assets.timescale.com/docs/images/migrate/migrate-source-rds-instance.svg"
76+
alt="Record endpoint, port, VPC details"/>
77+
78+
```sh
79+
export SOURCE="postgres://<Master username>:<Master password>@<Endpoint>:<Port>/<DB name>"
80+
```
81+
The value of `Master password` was supplied when this Postgres RDS instance was created.
82+
83+
1. Test your connection:
84+
```sh
85+
psql -d $SOURCE
86+
```
87+
You are connected to your RDS instance from your intermediary EC2 instance.
88+
89+
</Procedure>
90+
91+
[about-hypertables]: /use-timescale/:currentVersion:/hypertables/about-hypertables/
92+
[data-compression]: /use-timescale/:currentVersion:/compression/about-compression/
93+
[databases]: https://console.aws.amazon.com/rds/home#databases:

0 commit comments

Comments
 (0)