RDS Database Backup: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary Tag: wikieditor |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
== Overview == | |||
Connect to the database in a client app such as '''DataGrip''' or <strike>'''dbForge Studio'''</strike> or <strike>'''MySQLWorkbench'''</strike>. | Connect to the database in a client app such as '''DataGrip''' or <strike>'''dbForge Studio'''</strike> or <strike>'''MySQLWorkbench'''</strike>. | ||
The address for the host can be found in the AWS RDS console. | The address for the host can be found in the AWS RDS console. | ||
== DataGrip == | |||
=== Export database objects === | |||
<p class="alert alert-warning">Note that when copying database objects the definitions of those object can be stale. Select the object in question, then click the refresh icon to confirm that the latest definition is being used.</p> | |||
* Right click on the database. | * Right click on the database. | ||
* '''SQL Scripts''' > '''SQL Generator''' | * '''SQL Scripts''' > '''SQL Generator''' | ||
* | * In the '''SQL Generator''' pane, click the gear icon on the left. | ||
* There are 3 icons on the right side of the | ** '''Generate:''' ''Creation script completely'' | ||
** Set other options as needed. | |||
* After selecting the '''Generate''' option, SQL will be displayed in the left pane that fulfills that option. | |||
* There are 3 icons on the right side of the SQL pane. Click the disk icon to save the SQL to a file on disk. | |||
=== Export data === | |||
* Right click on the database. | |||
* '''Import/Export''' > '''Export with 'mysqldump'''' | |||
** '''Out path:''' ''[path to location of exported data]'' | |||
** '''Databases:''' ''[Defaults to the database that was clicked]'' | |||
** '''Tables:''' ''[Leave blank for all tables in database]'' | |||
** ''Select from options with checkboxes, e.g. '''Multiple row inserts''', '''MySQL create table options''', '''Add drop table''' etc.'' | |||
== MySQLWorkbench == | |||
In '''MySQLWorkbench''': App main menu > '''Server''' > '''Data Export''' | In '''MySQLWorkbench''': App main menu > '''Server''' > '''Data Export''' | ||
[[Category:RDS]][[Category:AWS]][[Category:Web Development]] | [[Category:RDS]][[Category:AWS]][[Category:Web Development]] | ||
Latest revision as of 15:14, 25 April 2024
Overview[edit]
Connect to the database in a client app such as DataGrip or dbForge Studio or MySQLWorkbench.
The address for the host can be found in the AWS RDS console.
DataGrip[edit]
Export database objects[edit]
Note that when copying database objects the definitions of those object can be stale. Select the object in question, then click the refresh icon to confirm that the latest definition is being used.
- Right click on the database.
- SQL Scripts > SQL Generator
- In the SQL Generator pane, click the gear icon on the left.
- Generate: Creation script completely
- Set other options as needed.
- After selecting the Generate option, SQL will be displayed in the left pane that fulfills that option.
- There are 3 icons on the right side of the SQL pane. Click the disk icon to save the SQL to a file on disk.
Export data[edit]
- Right click on the database.
- Import/Export > Export with 'mysqldump'
- Out path: [path to location of exported data]
- Databases: [Defaults to the database that was clicked]
- Tables: [Leave blank for all tables in database]
- Select from options with checkboxes, e.g. Multiple row inserts, MySQL create table options, Add drop table etc.
MySQLWorkbench[edit]
In MySQLWorkbench: App main menu > Server > Data Export