Backing Up HTML Content
Whenever you need to edit content on your site and you’re not 100% sure how the proposed change will appear, it is recommended to make your changes on a test page first. Here’s a simple procedure to help protect yourself from ever losing content or messing up your site.
- After logging in, go to the page that needs editing and click “Edit” next to the content which you want to change.
- Click “Source” in the upper left hand corner of the editor. You will see some some HTML code (don’t worry if it doesn’t make any sense).
- Select+All / Copy all this code (press Ctrl + A to select all then Ctrl + C to copy). You now have a duplicate copy of the code in your clipboard.
- Now visit the test page that should have already been created on your site to back up your work. This sandbox page is a hidden page on your site that allows you to test out your proposed edits before making them live. The direct link to your test page should be http://yoursite.colostate.edu/test or http://yoursite.colostate.edu/sandbox. If neither url works, please contact your resident web developer and we’ll create a test page for you.
- Once on the test page, click the”Edit” link. We are going to replace the content on the test page with the content from our live page.
- Click “Source” and press Ctrl + A to select all of the old code.
- Hit the delete key to clear out the previous HTML from the test page.
- Press Ctrl + V to paste your newly-copied HTML.
- Click “Update” to save your changes. Now you have just made a copy of your live page’s content on your test page.
- Now proceed to edit the test page as you normally would. Once you are satisfied with your work, reverse the process above to copy the HTML code from your test page and paste it into the live page.
- Finally, if something goes awry (eg, you accidentally delete content or mess up the alignment on the page), no one will see the mistake because it was made on a hidden page. To recover a previous version of the test page, see this article.
Notes About Lost Content
- Please use extra caution when deleting a page from your site, as deleted pages are irrecoverable (the page will be lost, although the modules on the page should still be intact but will require the intervention of your resident web dev to reinstate). A safer approach to “remove” a page from your site is to just hide it from public display. I highly recommend hiding a page/module whenever you’re not 100% sure that it won’t be needed down the road.
- Please use extra caution when deleting a module from a page on your site, as deleted modules are irrecoverable (both the content in the module and any previous versions of the content where applicable will be lost). A safer approach to “remove” a module from a page is to just hide it from public display.
- If you mess up any part of your site irrecoverably, including deleting a page or module you didn’t intend to, please let Shaun Geisert (491-0736) know right away – I can usually restore your site to the previous night’s backup, although you will obviously lose any work you may have done since the backup.
- If for whatever reason you forget to let me know about data loss from your site, note that ACNS may not keep backups for more than a few weeks. Eg, if you realized a few months after the fact that data was lost from your site we can only guarantee recovery for a period of a few weeks (typically anywhere from 1-2 weeks up to a couple months if you’re lucky). That’s why it’s always best to let me know immediately about a problem. Additionally, if you tell me right away after a problem occurs we can usually simply just use Google’s cache to find a recent version of your page and use that HTML content as a starting place for your edits. This way ACNS doesn’t even need to be involved in the data recovery.