January 2018
Intermediate to advanced
446 pages
12h 57m
English
If you want to copy data from one table to another, you can either use mysqldump or mysqlpump to back up certain rows and then load them into the destination table. As an alternative, you can also use pt-archive. If you specify the --no-delete option, pt-archiver will not delete the rows from the source:
shell> pt-archiver --source h=localhost,D=employees,t=employees --dest h=localhost,D=employees_archive -u <user> -p<pass> --where="1=1" --no-check-charset --limit 10000 --commit-each --no-delete
Read now
Unlock full access