Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Eran 292 posts 436 karma points
    Dec 02, 2010 @ 03:17
    Eran
    0

    offer free access to umbraco demo site

    hello,
    few times my clients wants to try out the umbraco admin themself, before they said yes.
    i have demo site on the net with the great CWS2 installed on it to able the client log in and play.
    also, this site is good for teach them on the system without hurt their live site.

    my question is that: how can i make the site automatically "reset" all the changes, lets says every hour?
    it it will work, i dont care to allow other umbraco community members to use this site to the same purposes.
    this feature will need to run automatically and should behave like "fresh" installation of CWS2.

    Thanks,

    Eran.

  • Paul Blair 466 posts 731 karma points
    Dec 02, 2010 @ 03:40
    Paul Blair
    0

    you could set up a SQL server job that restores the DB from a backup every hour. And then you will need some sort of scheduled task to re-copy the umbraco.config file. I'm not sure if that will be enough or if you will also need to re-publish the site...

  • Eran 292 posts 436 karma points
    Dec 02, 2010 @ 14:54
    Eran
    0

    i decided to keep it simple - the demo site will be for the end users to try so they have access only for the content tree and the media folder.
    so - we need to reset only the DB and the media folder every hour/day.

    DB reset - i can use some sort of cron job and its not a complex problem (excute url that runs DB script. i can use  Web Service Scheduler, schedule task package or pay and use my hosting schedule task add-on).

    there are still 2 problems:
    - how to "republish" the site? as far as i understand, after recreate the content from the DB the content tree must be republish.
    - how to auto-overwrite the media folder?

    anyone have an idea?

    Thanks!

  • Kim Andersen 1447 posts 2196 karma points MVP
    Dec 02, 2010 @ 23:38
    Kim Andersen
    0

    Hi Eran

    I don't have the solution to your problem, but I do know that the great guys from CogWorks in the UK have made a demo site that resets after some time. Maybe you could try contacting them to hear how they made their functionallity. Just a suggestion :)

    /Kim A

  • Ismail Mayat 4511 posts 10091 karma points MVP 2x admin c-trib
    Dec 06, 2010 @ 11:20
    Ismail Mayat
    0

    Eran,

    I created that demo reset site. After creating the site and publishing everything i took a copy of the umbraco.config xml cache and put it in another directory and took a back up of the database.  The script i have restores the database deletes all folders under media (users may have created images in media section) and copies over the backedup umbraco.config file.  That copy action basically mimics a full site publish, you could also possibly write your own web service to publish all pages that is called after the db is restored but my way works quicker.

    Regards

    Ismail

  • Eran 292 posts 436 karma points
    Dec 06, 2010 @ 11:33
    Eran
    0

    Thanks Ismail,

    so simple and yet great solution to my problem. is there any possibility that you willing to share with me this script?

    how do you execute the URL that runs this script every X interval?

    thanks,

    Eran.

  • Eran 292 posts 436 karma points
    Jan 02, 2011 @ 20:32
    Eran
    0

    hi ismail, if youve got the time to share the reset script it would be great.
    Thanks!

  • jigar 170 posts 233 karma points
    Jan 03, 2011 @ 07:25
    jigar
    0

    Hi Eran,

    You could do the googling for the script, This can be coded as windows service also. Or can be bunch of services - DOS base scripts as per your folder structure.

    To Restore database using job you can check http://bytes.com/topic/sql-server/answers/80544-restore-database-via-automated-order may help.

    Regards,

    Jigar ([email protected])

     

     

     

     

  • Eran 292 posts 436 karma points
    Jan 03, 2011 @ 11:48
    Eran
    0

    thanks jigar. i will check for it - also remember that i'm in shared hosting inviroment, so i have restriction. i'm sure that its not the hardest thing to do,
    but i just ask for it because someone did the same and i thought to save the time.

    Thanks,

    Eran.

Please Sign in or register to post replies

Write your reply to:

Draft