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.
- Views620 times
- Answers5 answers