Created
June 18, 2020 04:55
-
-
Save robrich/4e78c6e48a036fc924c1998c32dce56d to your computer and use it in GitHub Desktop.
MemSQL Backup with Split Partitions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- create a database with 2 master partitions | |
create database thedb partitions 2; | |
-- create sample data | |
use thedb; | |
create table data (msg varchar(200)); | |
insert into data (msg) values ('the data'); | |
-- notice how we're not using the database efficiently | |
show partitions; | |
-- run backup | |
backup thedb with split partitions to './memsqlbackup'; | |
-- check it | |
restore database thedb2 from './memsqlbackup/thedb.backup'; | |
select * from data; | |
drop database thedb2; | |
-- restore backup into place | |
drop database thedb; | |
restore database thedb from './memsqlbackup'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment