Sometimes we need to restore a blog from backups. Backups of the HTML code are emailed to storage at post.law.miami.edu manged by UM; consult the sysop for information on how to get these and how best to restore them. The steps for restoring backups of the database that has all the postings and comments are a little different depending on whether the blog being restored is the front page or one of the sections.
The following steps apply in either case: Find the backup you want: Backups of the SQL database that has all the text of all the jotwell posts are emailed weekly to editor@jotwell.com and stored under the “backups” tag. Clicking on “backups” in the left margin of gmail will show you a long list of backups.
(Note: before doing a restore, it’s probably smart to download a backup of the damaged database in case the restore turns out worse than what you wanted to replace. The easiest way to do a snapshot database backukp is to go to the dashboard of the blog, click Tools/Backup, and then create and download one.)
Pick the section and date you want, click on it, download the attachment.
Next, using an SFTP program such as WinSCP upload the file to the top-level directory of the blog you wish to restore (i.e. /home/jot_main/). Do not upload it to the top-level directory of the blog (ie. /home/jot_main/jowtell.com) because it’s possible someone might be able to see it there.
(Note that this and all other necessary passwords are found in the crown jewels file linked to from Froomkin’s office desktop. The file has a password you can get from Caroline Bradley or from Froomkin’s secretary.)
Then using a different program such as PUTTY, open a shell session on the blog you want to restore. find the file you uploaded and confirm its name ends in sql.gz
Unzip the uploaded file by navigating to the right directory then typing
gunzip (filename)
This should produce a file with the same name but without the .gz at the end (it should end in .sql).
The next step will be irreversible unless you have made a backup of the existing database (see above), as it will write over it, so be sure to have made that extra backup if possible. Type the following:
mysql -u {database username} -p –default-character-set=utf8 -h {database host} {database name} < {file you uploaded ending in .sql}
The names you substitute in for the items in {} (and don't use the brackets when you actually type this!) can be found either in the passwords spreadsheet, or by looking at the wp-config file for that blog.
You will be prompted for the DATABASE password, so have it ready
Restore from backup can take a few moments, so don't panic At this point matters diverge depending on whether it's the main section or subject section. For a subject section, the only way to re-create any postings that are not in the backup is to re-enter them based on the last version saved in the dropbox. Please check carefully for errors, especially in the citation block, as those tend to be caught late in the production cycle. For the main section, if the backup is less than two months old, it should be possible to restore all the new posts by going from the main dashboard to Syndication/Syndicated sites then updating all the syndicated sites at once. This can take a while. Also be sure to empty your browser's cache before checking if it worked. Even if the backup is older than two months, it's worth doing this to restore the most recent postings. After that it either has to be done manually, or there may be some way to get the RSS feeds for the sections to temporarily feed more posts





