Copied to clipboard

Flag this post as spam?

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


  • Toine 6 posts 47 karma points
    Jul 05, 2013 @ 18:59
    Toine
    1

    How to backup a .sdf file? (SqlCE database)

    I created my first Umbraco website, and I really like the CMS.

    But how can I backup all? (with a SqlCE DB used)

    I have copied all files, but "Umbraco.sdf" wont copy, it is used by other users.

    Possibly it has some db connections open, but how do I close them or how can I backup the DB in a other way?

  • Kevin Jump 2343 posts 14890 karma points MVP 8x c-trib
    Jul 06, 2013 @ 00:37
    Kevin Jump
    0

    Usually you need to stop your website/server (i.e IIS) to copy the SQL CE File - as it will contain the locking process. 

  • Toine 6 posts 47 karma points
    Jul 06, 2013 @ 08:23
    Toine
    0

    Yes of course, but what if the website is hosted where you do not have access to IIS?

    Is there any other solution?

  • Dan 1288 posts 3921 karma points c-trib
    Jul 08, 2013 @ 13:06
    Dan
    0

    This is a good question.  I tend to steer well clear of SqlCE in a production environment nowadays but do have a couple of old client sites running CE.  I'm assuming it means that the databases are never correctly backed up!  I'd be very interested to know if there's a back-up solution that is able to disconnect CE before running.

    Another major flaw with running SQL Ce in a production environment!

  • Kevin Jump 2343 posts 14890 karma points MVP 8x c-trib
    Jul 08, 2013 @ 13:19
    Kevin Jump
    103

    Just had a quick look, 

    placeing an app_offline.htm file in the root of your solution, will take the application off line (it displays the contents of the app_offline file) and disconnects IIS from the DB so you can rename/copy do what you need to do. 

     

    http://weblogs.asp.net/scottgu/archive/2005/10/06/426755.aspx

    Kevin 

  • Dan 1288 posts 3921 karma points c-trib
    Jul 08, 2013 @ 13:22
    Dan
    0

    Good find, thanks Kevin.

  • Toine 6 posts 47 karma points
    Jul 08, 2013 @ 18:30
    Toine
    0

    Tnx Kevin, that worked fine.

     

Please Sign in or register to post replies

Write your reply to:

Draft