The Techjoomla Blog

Stay updated with all the latest happenings at Techjoomla. From news about the developments in your favourite extensions to Tips & Tricks about the Joomla CMS, Framework & Development.
Font size: +
1 minute reading time (256 words)

Joomla File Rsync & Database Sync Script

Joomla-File-Rsync--Database-Sync-Script

One of the major headaches of maintaining a Joomla demo is that you have to refresh the data every now & then to restore the demo to its best as user usage can change a lot of data & interfere with the optimum demonstration of your products. We used to do this by simply having a cron job restore a backup of the database with the optimum data. But this had major issues as we had to upgrade extensions on the demo to the latest & these in some cases also involved structural database changes.

To solve this we maintain a clean version of our demos sites on a Local server. Our developers regularly update extensions at every release on our demo server. Once the demo upgrade has been tested & is satisfactory, we run the attached script. This is what the script does.

  1. Uses Rsync to find & sync changed files
  2. Take a backup of the local database
  3. Refresh the remote database with this dump
  4. Exclude files like configuration.php & cache folders from the sync

Using Rsync means that only changed files %MCEPASTEBIN% are synced. It is also set up to remove any deleted files. In case of the database, a differential is not taken, the entire database is replaced.

You can also use this script to move local sites to live. Also ideal if you have a more or less static site & want to maintain a Dev copy to try out content changes, new extensions etc.

The Script on GIST

Get it now!

2
×
Stay Informed

When you subscribe to the blog, we will send you an e-mail when there are new updates on the site so you wouldn't miss them.

Joomla 3.0 is here. 3 Things that Matter most!
Profile Completeness 2.0 (Free) is released

Related Posts

 

Blog Topics