cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sullivane
Champion Sweeper III
Has anyone worked out a backup script or something that works with SQL Express they care to share? I was thinking of making something, just wondering if it's already been done.
1 ACCEPTED SOLUTION
sullivane
Champion Sweeper III
Dang nab it!

Here is the corrected code

View solution in original post

14 REPLIES 14
sullivane
Champion Sweeper III
Looks like you are using the compact version that is installed with LS. I am sorry, I didn't think to mention this is written from SQL Express database which is free from Microsoft.

I will edit the original post to reflect this.
BrianM
Engaged Sweeper III
what do I put where "BACKUP DATABASE [?] TO DISK=" is? That and I do have database rights for the account I'm using, and it still will not back up lansweeperdb.sdf which once I get the first question completed the issue will probably resolve itself.

Database:

SQL Compact: C:\Program Files\Lansweeper\website\..\SQLDATA\lansweeperdb.sdf


however, I find the database at this location: C:\Program Files\Lansweeper\SQLData

thanks for the assist!
sullivane
Champion Sweeper III
Sorry, my install is to the G drive, I thought I made all the changes to make it to C, but must have missed one.

Fixed and reattached

Also a tip. Make sure the user you are running this under as rights to the folders and database. I started running this under a user that had rights to the folder but not the database. It still runs, just leaves out the database.
BrianM
Engaged Sweeper III
there is a typo in this script. In the Actions Folder section, the -tzip should be C: not G:
sullivane
Champion Sweeper III
I created a batch file. Personalize to your install. You will need 7zip. This is written for SQL Express, not the SQL compact that is install with LS by default.