Re: Weekly Mass Data Relocation
Would an incremental solution be better?
Keep 5 weeks of data on local (4 previous + current week)
Each day:
mysqldump --no-create-db --no-create-info --extended-insert
--complete-insert --where='data_entry_date between CURDATE() - INTERVAL
1
DAY and CURDATE()' database_name table_name > 1_dump.sql
## gets yesterdays data
ftp to web server and apply plus:
delete from table_name where data_entry_date < CURDATE() - interval 4
week;
You will incur no downtime by having to truncate the table and reinsert
all 200MB. Your processing will be much more efficient.
Depending on your version you may have to use INTERVAL 30 DAY
|