I decided to begin testing certain aspects of the cp, and the first thing is the backing up and restoring of a customers spaces. I had a customer that was setup, had installed wordpress on it, with a db, no ftp user, no mail, basically just the website, I ran a backup from the customers spaces location, this worked fine and created the backup 100%.
I then deleted the space, and then recreated the space with the same name, etc. I copied the backup to the backup folder ans then proceeded to run the restore, it asked for the file, I selected it and then the backup began. 3 seconds later the backup says its completed, no errors or anything. But investigating further no websites were restored, n dbs were restored either.
I opened the file with winrar and I can see all the database backups, and website files, etc, so the file is ok, but the restore was a no go.
Am I under the wrong impression or did I do something wrong, I am under the impression if a backup of a space is created, the restore from a backup would or should populate the system back to the way it was prior ?
Hmm, thats funny i actually never tested that.
It should be possible to restore.
Can you test 2 scenarios for me?
- New space with no provisioning (so all checkboxes disabled, no domain, no nothing) and then try and import the backup (make sure the domain / websites etc thats in the backup do not exist in the system somewhere else)
- New space with provisioning (so domain, website, etc is created as the backup used to have) then restore backup.
I assume one of the 2 scenario’s should work, but that being said i agree that we should improve the backup and restore features in the near future, as it seems quite widely asked for and used, yet i don’t think the current implementation is great.
Ok After trying again, I tried deleting the website or resources in the space and then restoring that works fine, but if you delete the space and recreate it with the same name and try restore it says complete but takes 0 seconds and nothing is restored, does the backup keep a db entry id or something that differs when it is recreated maybe ?
Ok after backing up and recreating the same plan and backing up again, it seems it is down to the fact that the space id differs. ie the first space is id 100 and when you delete it and recreate it the space id is recreated with a new id, if you then edit the backupcatalog file and change the ids to the new spaces id it runs and restores.
Surely this id number should be automatically picked up when you open the space and select to restore the backup, ie ignore the id in the backup and use the selected spaces id instead. This will allow you to restore the backup to a different space, so as to allow a user to move his websites between spaces surely ?
Ok also the physical path of the space also needs to be selected from the new space location ie “c:\hostingspaces\testdom”.
In testing this I setup a hosting space on a server, created email accounts, mysql, mssql dbs, ftp accounts, website, domains, etc. By editing the backupcatalog file, and changing the packageid field in all the xml items, as well as ensuring the front portion of the paths are changed to the new path, the restores goes fine and all services are restored.
I would suggest that when backing up the space, the path to all the services ie the initial path to the space is not included in the xml paths, so that the path for the website would be changed for example from <ContentPath>C:\HostingSpace\idowebsi\www.idowebsites.co.za\wwwroot</ContentPath> to <ContentPath>www.idowebsites.co.za\wwwroot</ContentPath> this also would go for the log files, etc.
Then when restoring the backups the path form the space where the backup is being restored to is used and appended, creating the new correct path for the restored location. Doing this and substituting the packageid should then allow for any backup to be restored to a new location even if the space folder changes.
I am not sure how the serviceids will be effected across multiple servers, ie if the webspace is moved to a different server. I will test this tomorrow and give feedback. Maybe an option to select the correct services on the new server or automatically learn the service id and subsitute it as well.
Could you give me a step-by-step process of how you did this?
So far I took a Back-up .scpak from the Space Statistics page (bottom right) on the old server and then created a new account on the new server, then went to the same Space Statistics page and clicked the Restore link, located the uploaded .scpak and clicked the restore button. It then took 1 second and said it was successful, but did nothing, just like you said. I tried this with a website, domain and FTP account attached, then again without any of that, but still the same result. The paths you mentioned; where are they? Are they zipped within the .scpak file?
I have a lot of accounts to move and was hoping I would be able to use this feature, but so far I don’t seem to be having any luck.
You basically open the zip file, either rename it to .zip or use a zip program that can open the file, rename is simplest.
Edit the backupcatalog.xml file.
You need to edit the packageid=”xx” to the new hosting spaceid (goto spaces in solidcp and put mouse over package to get new spaceid.)
You also need to edit all the paths if the paths have changed
Thanks for your reply TechGuy; much appreciated.
I tried what you said but I still get 1 second of nothing when I click restore.
Here is exactly what I did; please tell me where I am going wrong:
- On old server space go to Space Statistics and click Back-up at the bottom right of screen.
- Download .scpak file once backup is complete
- Rename .scpak file extension to .zip and extract
- Open BackupCatalog.xml file and edit ALL instances of packageId within the file to new ID (taken from hovering mouse over package in new server Space to get new spaceid – in my case, from 358 to 10).
- Edit all instances of old server URL in XML file to new server Space URL (in my case C:\HostingSpaces\*space name*)
- Re-zip the XML and zipped data file into a new zip file and upload to new server space root directory.
- Go to new spaces Space Statistics page and click Restore at bottom right, locate zip file in root directory and click Restore button.
This is exactly what I did and it then took one second to say complete but did nothing.
What have I missed or what am I doing wrong?
- Views1333 times
- Answers12 answers