<> = Restoring a Data Snapshot to LOC SMS = {{{#!wiki warning The actual commands listed on this page are deprecated. Equivalent commands are now made available in the [[https://pypi.python.org/pypi/pyLOCSMS|pyLOCSMS]] package, and are minimally documented [[https://rattailproject.org/buildbot/docs/pylocsms/api/db.load.html|here]]. }}} This document outlines the steps necessary to restore a data snapshot (which was captured according to [[Utilities/LOCSMS/BackupData|these instructions]]) to a test instance of LOC SMS. Please see [[Utilities/LOCSMS#Data_Snapshots|here]] for a little more info on why you might do this. These steps assume that you have a test server (head office or store) instance of SMS. This test server should be the machine on which you perform the steps. == Prerequisites == First you must [[Installation|install]] (and perhaps [[Configuration|configure]]) Rattail; in particular the `rattail.sw.locsms` (`>=0.3a13`) package. == Locate the Snapshot == You should already have [[Utilities/LOCSMS/BackupData|created the data snapshot]]. Copy it to a local path of your choice, e.g. your Desktop. == Restore the Snapshot == Open a terminal and change directory to your Desktop, or another convenient location of your choice. Then execute the following command: {{{ $ rattail sms-restore-data data.zip }}} Note that the `data.zip` argument may be any path and filename of your choice. It should point to your snapshot file. You can run this command to see all your options: {{{ $ rattail help sms-restore-data }}} == What Just Happened? == When you restore a snapshot using the method described here, Rattail is simply extracting the contents of the zip file and "deploying" each contained file to the inbox of the local SMS instance. Since the "load" files contained in the snapshot are proper SIL files which instruct SMS to replace the contents of a table with the data found in the file, this has the effect of overwriting table data. As with the [[Utilities/LOCSMS/BackupData|data backup utility]], this restore utility exists solely for convenience. Restoring load data may also be accomplished with any of several other methods.