summaryrefslogtreecommitdiff
path: root/scripts/migration
diff options
context:
space:
mode:
authordrebs <drebs@riseup.net>2017-09-07 12:14:33 -0300
committerdrebs <drebs@riseup.net>2017-09-07 17:19:19 -0300
commitc48c7d79099bbc50f86f16c31c06e6921ec0e90d (patch)
treec55fa248f51ab2d2bb740693a5eed7dc7d470c42 /scripts/migration
parentec9e26b162257b32b9393c884b32646f44a5d25d (diff)
[pkg] fix and improve migration script README file
Diffstat (limited to 'scripts/migration')
-rw-r--r--scripts/migration/0.9.0/README.md38
-rwxr-xr-xscripts/migration/0.9.0/migrate.py4
2 files changed, 28 insertions, 14 deletions
diff --git a/scripts/migration/0.9.0/README.md b/scripts/migration/0.9.0/README.md
index 919a5235..ceb53bb0 100644
--- a/scripts/migration/0.9.0/README.md
+++ b/scripts/migration/0.9.0/README.md
@@ -1,7 +1,12 @@
-CouchDB schema migration to Soledad 0.8.2
-=========================================
+CouchDB schema migration script: from soledad-server < 0.9.0 to >= 0.9.0
+========================================================================
-Migrate couch database schema from <= 0.8.1 version to 0.8.2 version.
+Starting with Soledad Server 0.9.0, the CouchDB database schema was changed to
+improve speed of the server side storage backend. Because of that, this script
+has to be run for all Leap providers that used to provide email using Soledad
+Server < 0.9.0.
+
+If you never provided email with Leap, you don't need to run this script.
ATTENTION!
@@ -10,14 +15,23 @@ ATTENTION!
- This script does not backup your data for you. Make sure you have a backup
copy of your databases before running this script!
- - Make sure you turn off any service that might be writing to the couch
- database before running this script.
+ - Make sure you turn off any service that might be writing to the couch user
+ databases before running this script. From the Leap side, these would be
+ Leap MX in the "mx" node and Soledad Server in the "soledad" node.
Usage
-----
-To see what the script would do, run:
+When you run the script, you will see no output. All the output will be logged
+to files, as explained in the Log section below.
+
+To see command line options, run:
+
+ ./migrate.py --help
+
+To see what the script would do, run the following and check the logs
+afterwards:
./migrate.py
@@ -25,16 +39,16 @@ To actually run the migration, add the --do-migrate command line option:
./migrate.py --do-migrate
-See command line options:
-
- ./migrate.py --help
-
Log
---
-If you don't pass a --log-file command line option, a log will be written to
-the `log/` folder.
+The script will be installed in ``/usr/share/soledad-server/migration/0.9.0``,
+and will log the results of any run by default to the ``logs/`` subdirectory of
+that folder (i.e. ``/usr/share/soledad-server/migration/0.9.0/logs``).
+
+If you don't pass a ``--log-file`` command line option, a log will be written
+to the log folder as described above.
Differences between old and new couch schema
diff --git a/scripts/migration/0.9.0/migrate.py b/scripts/migration/0.9.0/migrate.py
index 5ef516a2..5c49f5b4 100755
--- a/scripts/migration/0.9.0/migrate.py
+++ b/scripts/migration/0.9.0/migrate.py
@@ -2,7 +2,7 @@
# migrate.py
"""
-Migrate CouchDB schema to Soledad 0.8.2 schema.
+Migrate CouchDB schema to version 1 (soledad-server >= 0.9.0).
******************************************************************************
ATTENTION!
@@ -32,7 +32,7 @@ from leap.soledad.server import get_config
from migrate_couch_schema import migrate
-TARGET_VERSION = '0.8.2'
+TARGET_VERSION = '0.9'
DEFAULT_COUCH_URL = 'http://127.0.0.1:5984'
CONF = get_config()
NETRC_PATH = CONF['admin_netrc']