I'm wondering about an efficient way to copy a live database into a test database at intervals of 3 months.

Currently, I'm manually deleting the test database and copying each table of the live database into a new test database by mean of a PHP script.

Is it possible to schedule a job to take care of this task for instance?

Thanks in advance.