Backups working: now time to plan more sophisticated system
Posted by mholmes on 12 Dec 2008 in Activity log
Basic backup (saving the output of a pipeline into a directory on the filesystem) is now working, thanks to some help setting permissions from sysadmin.
Now a proper GUI and plan needs to be implemented. This is my first shot at a plan:
- There needs to be an editorial index page which shows a list of all the documents (published and in proof) which are in the system.
- The page should have links to back up specific output formats for each document.
- Those links would invoke the pipeline which calls the flowscript, but they would do it through an AJAX call, so that the index page does not need to be replaced.
- The AJAX script would call the pipeline, and write the server response to a
<div>on the page. - The server response needs to be encoded in a TEI file of messages, which is stored in the db. This would be similar to the
site.xmlfile which currently holds all the site rubric. - The pipeline which sends back the message would retrieve a block of something from the XML file, and pass it for processing to the
<site.xsl>file, but in some manner which preventssite.xslfrom building a full page; we only need an XHTML div, for insertion into the index page. - One outcome is an error message; this message should give a warning about permissions, the most likely cause for failure of the operation.
- Once all this is working for individual files/formats, the next stage is to enhance the AJAX page so that it can do the whole lot.
- This would work by having the JavaScript create a queue of URLs to be called, and when it gets a successful response from each one, it invokes the next one, also reporting its progress as it goes. There would also need to be a method for bailing on the process.
- A similar batch function should be available for each individual document, invoking all the formats.
- Finally, we need directory browsing to be available through the Cocoon sitemap, so the editor (or indeed regular readers) can see and access all the backup files.
This setup would give the option for the editor to backup the whole collection, or just one changed file, in all its output formats (including the source XML, presumably), so that a regular backup of changes could be taken, and also when a single file is edited, copies could be regenerated for only that file.