title: PHP / MySQL Conceptual Database 'Sync' question
body: <p>I am working on a PHP class implementing <code>PDO</code> to sync a local database's table with a remote one.</p>
  
  <p><strong>The Question</strong></p>
  
  <p>I am looking for some ideas / methods / suggestions on how to implement a 'backup' feature to my 'syncing' process. <code>The ideas is</code>: Before the actual insert of the data takes place, I do a full wipe of the local table's data. Time is not a factor so I figure this is the cleanest and simplest solution and I wont have to worry about checking for differences in the data and all that jazz. <code>The Problem is</code>, I want to implement some kind of security measure in case there is a problem during the insert of data, like loss of internet connection or something. The only idea I have so far is: Copy said table to be synced -> wipe said table -> insert remote tables data into local table -> if successful delete backup copy.</p>