Save/Backup/Restore xml?
Posted: Mon Jun 20, 2016 3:21 pm
My package currently consists of various created data files + the xml file.
I've written a backup command for it that copies/restores all the script created data files to another folder. How might I go about having it copy/save the current xml file there also?
I might be wrong, but it appears once the original xml is loaded, it's saved as a dated xml in the 'current' folder of the profile every time mudlet is exited. That xml (in the 'current' folder) is what's loaded on next restart. Would just copying the most recent xml from that folder to another directory work as a backup?
Other then just exiting, clicking the 'save profile' button also appears to save a new xml into the current folder (example: 20-06-2016#11-23-24.xml). Is there a Mudlet command I can call to create that file (without having to click save/or exit)?
The other half of that would then be restoring. If I copied that same file back to the current folder and gave it a more recent name/timestamp, would it then be loaded when mudlet starts? Would using the installModule command on that xml cause it to be loaded properly replacing the existing loaded script if I were to do this while mudlet is running, not restarted?
If a restart of mudlet is required to load the xml file from the 'current' folder, is there a command I could use to force a mudlet restart?
Does anyone have a script written (for any mud) with coding done for backing up and restoring xml files?
(edit)
I found the resetProfile() command. Would the expected functionality of this command be to reset / load the most recent xml file present in the 'current' folder?
I've written a backup command for it that copies/restores all the script created data files to another folder. How might I go about having it copy/save the current xml file there also?
I might be wrong, but it appears once the original xml is loaded, it's saved as a dated xml in the 'current' folder of the profile every time mudlet is exited. That xml (in the 'current' folder) is what's loaded on next restart. Would just copying the most recent xml from that folder to another directory work as a backup?
Other then just exiting, clicking the 'save profile' button also appears to save a new xml into the current folder (example: 20-06-2016#11-23-24.xml). Is there a Mudlet command I can call to create that file (without having to click save/or exit)?
The other half of that would then be restoring. If I copied that same file back to the current folder and gave it a more recent name/timestamp, would it then be loaded when mudlet starts? Would using the installModule command on that xml cause it to be loaded properly replacing the existing loaded script if I were to do this while mudlet is running, not restarted?
If a restart of mudlet is required to load the xml file from the 'current' folder, is there a command I could use to force a mudlet restart?
Does anyone have a script written (for any mud) with coding done for backing up and restoring xml files?
(edit)
I found the resetProfile() command. Would the expected functionality of this command be to reset / load the most recent xml file present in the 'current' folder?