WSS 3.0 on Server 2003 within a Domain.
I set the server up 3.5 years ago along with a test setup. It's the first and only SharePoint install. I recently had to migrate the content database from Microsoft SSEE to SQL Express 2008 R2 due to reaching the size limitation of MS SSEE. Only the content database was moved, all others were left on MS SSEE. This was performed on the test environment and then on the production setup.
The process appeared to work but then I reaslised the scheduled backups which use stsadm were no longer working (they had worked with no issue when all databases were in MS SSEE). Using the test environment I traced the issue down to permissions in SQL Express. (I need to review this as I've provided too high a level and will attempt to trim it back). I use the following to perform the backup of the content database.
stsadm -o setsitelock -url https://xxx.yyy.ac.uk -lock noaccess stsadm -o backup -url https://xxx.yyy.ac.uk -filename "D:\Backup\Mon.bak" -overwrite stsadm -o setsitelock -url https://xxx.yyy.ac.uk -lock none
I then tried to restore the backup using stsadm which had been tried, tested and worked when all databases were in MS SSEE.
stsadm -o restore -url https://xxx.yyy.ac.uk -filename "D:\Backup\Mon.bak" -overwrite
I got the following error.
Another site already exists at '/'. Chose a new URL, or specify the -overwrite flag to overwrite the existing site.
I then tried to restore the backup created by stsadm by using SQL Server Management Studio. That resulted in an error message saying the format was incompatible.
After sometime looking for answers on Google and this site I came to the conclusion (perhaps incorrectly) that the site needed to prevent access to the database and to do that it should be removed via Central Administration. I did this and ran the restore command. It completed and I added the content database back into SharePoint using CA. I checked I could access and modify the site via a browser and I could.
Wishing to check my documentation was correct, I attempted to repeat the process and I got the original error. This time when I attempted to add the content database via CA I noticed the properties listed 0 sites. Realising SP was 'confused' with the content databases, I removed it again via CA and discovered I could still access and edit the sites via the browser.
I am guessing that two content databases (GUIDs) have some how become registered with SharePoint but I don't know where that registration takes place. I can't seem to affect the content database currently visible via the browser.
How do I rectify the situation and is there a better way of restoring the backup?
Apologies if there's too much information, this is my first posting. Any thoughts regards a solution are greatly welcomed.