Recommended sites

Add to MyYahoo!
Subscribe in NewsGator Online
Add to Newsburst
Add to Google
Add to My AOL
Add to Pluck
Subscribe in FeedLounge
Add to Windows Live
Add to NetVibes
Subscribe in Rojo
Subscribe in Bloglines
Add to MyMSN
Add to Plusmo for your cellphone
Add to PageFlakes
Add to Technorati
Add to BlinkBits
Renew a Joomla Demo Site Print E-mail
User Rating: / 2
PoorBest 
Saturday, 08 April 2006 12:54
The demo site demo.waltercedric.com is automatically deleted (database and file system) and restored every 60 minutes to wipe the system clean for other new users.

login to Administrator panel is

loginadmin
passwordadmin

How I've done it...
 green value have to been replace

1. Create all needed directories
Ex for plesk
# mkdir /var/www/vhosts/waltercedric.com/private/db-demo-initial
# mkdir /var/www/vhosts/waltercedric.com/private/file-demo-initial

2. First make a INITIAL backup from the database
In the state you want it to be for your demosite with mysqldump:
# mysqldump -u [DatabaseUsername] -p [DatabasePassword] [DatabaseName] > /path/to/filename

Ex for plesk
Files are store in private directory so only me can access them.
# mysqldump -uDatabaseUser -pDatabasePassword DatabaseName > /var/www/vhosts/waltercedric.com/private/db-demo-initial/DatabaseName.sql

3. Then make an INITIAL backup of the file structure
#  cp -pir srcDirectoy destinationDirectory

Ex for plesk
# cp -prf /var/www/vhosts/waltercedric.com/subdomains/demo/httpdocs/* /var/www/vhosts/waltercedric.com/private/file-demo-initial

4. Then put everything in a CRONTAB

The purpose of this task is to restore file periodically, You can use mysqqlimport (but it didnt worked for Me), so I use the mysql command line
If you want lets say: restore database every 1 hours, ten past the hour, your crontab entry would look like this:

10 */1 * * * mysql -u[username] -p[password] [databasename] < [/path/to/filename]

If you want lets say: restore file every 1 hours, twenty past the hour, your crontab entry would look like this:
20 */1 * * *  cp -pir srcDirectoy destinationDirectory

Ex
5 */1 * * * cp -prf /var/www/vhosts/waltercedric.com/private/file-demo-initial/*  /var/www/vhosts/waltercedric.com/subdomains/demo/httpdocs
6 */1 * * * mysql -uXXXX -pYYYYY demo < /var/www/vhosts/waltercedric.com/private/db-demo-initial/demo.sql


Comments
Add New Search RSS
Write comment
Name:
Email:
 
Title:
UBBCode:
[b] [i] [u] [url] [quote] [code] [img] 
 
:):grin;)8):p:roll:eek:upset:zzz:sigh:?:cry
:(:x
Please input the anti-spam code that you can read in the image.

3.20 Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

 
Content View Hits : 2418414

Enter Amount: