# HG changeset patch # User Paul Boddie # Date 1461331587 -7200 # Node ID 008b80c604daea1c40ca6d54b56862284674b7c4 # Parent 46af5559d721c833e7b8544e0417a040d01fd355 Added some documentation for the store-copying tool. diff -r 46af5559d721 -r 008b80c604da docs/wiki/Administration --- a/docs/wiki/Administration Fri Apr 22 15:03:43 2016 +0200 +++ b/docs/wiki/Administration Fri Apr 22 15:26:27 2016 +0200 @@ -131,3 +131,38 @@ use of this tool will be performed by the packaging system provided by an operating system distribution. The `tools/install.sh` script runs the above tool as part of the installation process. + +== Copying Stores and Changing Store Types == + +A rudimentary tool is provided that can copy data between stores, even those of +different types, thus allowing the migration of data from one kind of store to +another. Although it does not perform the copying in the most efficient manner, +it provides a convenient method of copying that uses the software's own general +interfaces for store access and thus acts as a way of verifying that these are +functioning correctly. + +To copy a configured store to another filesystem location: + +{{{ +tools/copy_store.py -t file /tmp/store /tmp/journal +}}} + +To copy a configured store to a database (which must have been initialised): + +{{{ +tools/copy_store.py -t postgresql 'dbname=store' 'dbname=journal' +}}} + +To copy an explicitly-specified file store to another filesystem location: + +{{{ +tools/copy_store.py \ + -f file /var/lib/imip-agent/store /var/lib/imip-agent/journal \ + -t file /tmp/store /tmp/journal +}}} + +The help message for the tool provides general guidance for its use: + +{{{ +tools/copy_store.py --help +}}}