2

I am a newbie and hence need some advice.

My problem is similar to this question but I couldn't resolve the problem yet.

Problem: I am processing data internally and generating 8-10 tables. I want to replicate those tables (in 2 different schema) to remote server automatically and continuously every 15 minutes.

I went toward AWS solution using EC2 DMS RDS but got stuck there and couldn't resolve the problem after spending two days (here is my other question if it helps to understand the background).

Proposed Solution: By doing research and reading this post, this post, this post and this post, I have come up to a different solution.

  1. Automatically Dump and FTP the csv file(s) to remote web server/cPanel every 15min using PHP and Windows Task Schedular.
  2. Automatically read those csv file(s) and update records on remote DB using PHP script and with some sort of task schedular on web server? (is it possible?).

Question/Advice: Is my above approach correct or do I need to find another or better solution to do this? If this approach is correct then any kind of related help would be highly appreciated.

Please note: I couldn't find any solution after spending hours on research on and off S.O. I'm no natural born coder, I find solutions to what I need to achieve

4
  • Have you tried something like this? digitalocean.com/community/tutorials/… Commented Aug 1, 2017 at 2:10
  • @Difster I came across this but haven't tried it yet. May be in my understanding this is manual replication which can't be automated? Commented Aug 1, 2017 at 3:23
  • Once you have that set up, you shouldn't need to do anything else manually unless you have an infrastructure change. Commented Aug 1, 2017 at 3:25
  • Thanks, if this process will process DBs continuously then I will try to implement it now. Commented Aug 1, 2017 at 4:45

1 Answer 1

1

I think you should do the first part as you mentioned

  1. Automatically Dump and FTP the csv file(s) to remote web server/cPanel every 15min using PHP and Windows Task Schedular.
  2. Automatically read those csv file(s) and update records on remote DB using PHP script and with some sort of task schedular on web server? (is it possible?).

After that as you mentioned that it is cpanel, you can setup cronjob to run this php file in your step 2. Setup php file to send email once the database is updated for your records. The email should be setup for 2 outcomes. One message if there was an error updating database and one if database was updated successfully.

Cronjob is quite useful tool on cpanel.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.