1
00:00:00,300 --> 00:00:01,920
So here is a short lecture

2
00:00:01,920 --> 00:00:03,900
that unfortunately you have to learn for the exam,

3
00:00:03,900 --> 00:00:05,190
maybe for one question.

4
00:00:05,190 --> 00:00:08,760
It is a way to do migrations to Aurora MySQL.

5
00:00:08,760 --> 00:00:10,680
So if you have an RDS database

6
00:00:10,680 --> 00:00:13,380
and you want to move it into Aurora MySQL,

7
00:00:13,380 --> 00:00:15,630
the option number one is to take a database snapshot

8
00:00:15,630 --> 00:00:17,460
from the RDS MySQL database

9
00:00:17,460 --> 00:00:21,030
and you restore this snapshot as a MySQL Aurora database.

10
00:00:21,030 --> 00:00:22,680
Potentially, you'll have some downtime

11
00:00:22,680 --> 00:00:24,510
because you have to stop operations

12
00:00:24,510 --> 00:00:28,050
on the first MySQL database before migrating to Aurora.

13
00:00:28,050 --> 00:00:30,060
The option number two, which is more continuous,

14
00:00:30,060 --> 00:00:34,020
is to use and create an Amazon Aurora Read Replica

15
00:00:34,020 --> 00:00:35,550
on top of your RDS MySQL.

16
00:00:35,550 --> 00:00:37,410
So it's a possibility indeed.

17
00:00:37,410 --> 00:00:39,120
And once the Replica lag is zero,

18
00:00:39,120 --> 00:00:41,100
that means that once the Aurora Replica

19
00:00:41,100 --> 00:00:43,110
has fully caught up with MySQL,

20
00:00:43,110 --> 00:00:46,140
you can promote it into its own database cluster.

21
00:00:46,140 --> 00:00:47,730
Now this can take a bit more time

22
00:00:47,730 --> 00:00:49,440
than the database snapshot option

23
00:00:49,440 --> 00:00:51,930
and cost some money because of the network cost

24
00:00:51,930 --> 00:00:55,650
that may be associated with this replication.

25
00:00:55,650 --> 00:00:59,100
The other option is, if you have a MySQL database

26
00:00:59,100 --> 00:01:01,350
that is external to RDS,

27
00:01:01,350 --> 00:01:03,240
then you can back it up

28
00:01:03,240 --> 00:01:07,110
using the Percona XtraBackup utility.

29
00:01:07,110 --> 00:01:10,440
This will create a backup file and you put it in Amazon S3

30
00:01:10,440 --> 00:01:12,810
and then there is an option from Amazon Aurora

31
00:01:12,810 --> 00:01:15,150
to directly import this backup file

32
00:01:15,150 --> 00:01:18,270
into a new Aurora MySQL DB cluster.

33
00:01:18,270 --> 00:01:19,103
Just so you know,

34
00:01:19,103 --> 00:01:22,380
this only supports the Percona XtraBackup utility.

35
00:01:22,380 --> 00:01:26,040
The other option is to use the MySQL Dump utility

36
00:01:26,040 --> 00:01:28,800
to run it against a MySQL database

37
00:01:28,800 --> 00:01:31,020
and you would pipe the output of this

38
00:01:31,020 --> 00:01:34,020
into your existing Amazon Aurora database.

39
00:01:34,020 --> 00:01:35,940
So this is taking a lot of time

40
00:01:35,940 --> 00:01:38,520
and this does not leverage Amazon S3.

41
00:01:38,520 --> 00:01:41,310
And a last option is to use Amazon DMS,

42
00:01:41,310 --> 00:01:43,380
if both databases are up and running

43
00:01:43,380 --> 00:01:46,203
to do continuous replication between the two databases.

44
00:01:47,340 --> 00:01:49,980
We do the same process for PostgreSQL,

45
00:01:49,980 --> 00:01:52,650
so for RDS, it's pretty much similar.

46
00:01:52,650 --> 00:01:56,190
You have two option to use the database snapshots

47
00:01:56,190 --> 00:01:58,530
restored as an Amazon Aurora database

48
00:01:58,530 --> 00:02:02,280
or you create an Amazon Aurora Read Replica of PostgreSQL

49
00:02:02,280 --> 00:02:04,170
to have to have a Read Replica

50
00:02:04,170 --> 00:02:06,180
and then you wait until a replication lag is zero

51
00:02:06,180 --> 00:02:08,910
to promote it into its own database cluster.

52
00:02:08,910 --> 00:02:11,430
And if it's an external PostgreSQL database

53
00:02:11,430 --> 00:02:13,110
that you want to migrate to Aurora,

54
00:02:13,110 --> 00:02:14,340
you can create a backup of it

55
00:02:14,340 --> 00:02:16,830
and then you put the backup in Amazon S3,

56
00:02:16,830 --> 00:02:18,720
and then you import the data

57
00:02:18,720 --> 00:02:22,050
using the AWS S3 Aurora extension

58
00:02:22,050 --> 00:02:24,660
and this will create a new database out of it.

59
00:02:24,660 --> 00:02:26,910
And finally, again, you can use DMS to migrate

60
00:02:26,910 --> 00:02:29,970
from PostgreSQL to Amazon Aurora continuously.

61
00:02:29,970 --> 00:02:31,620
Okay. That's it for this lecture.

62
00:02:31,620 --> 00:02:34,570
I hope you liked it and I will see you in the next lecture.

