Browse Source

Updated documentation.

default 3 years ago
parent
commit
de5345e5bd
3 changed files with 15 additions and 1 deletions
  1. 1 1
      data.c
  2. 5 0
      doc/snac.1
  3. 9 0
      doc/snac.8

+ 1 - 1
data.c

@@ -73,7 +73,7 @@ int srv_open(char *basedir, int auto_upgrade)
                     ret = db_upgrade(&error);
                     ret = db_upgrade(&error);
                 else {
                 else {
                     if (xs_number_get(xs_dict_get(srv_config, "layout")) < db_layout)
                     if (xs_number_get(xs_dict_get(srv_config, "layout")) < db_layout)
-                        error = xs_fmt("ERROR: db layout changed - execute 'snac upgrade' first");
+                        error = xs_fmt("ERROR: disk layout changed - execute 'snac upgrade' first");
                     else
                     else
                         ret = 1;
                         ret = 1;
                 }
                 }

+ 5 - 0
doc/snac.1

@@ -145,6 +145,11 @@ Initializes the database. This is an interactive command; necessary
 information will be prompted for. The
 information will be prompted for. The
 .Ar basedir
 .Ar basedir
 directory must not exist.
 directory must not exist.
+.It Cm upgrade Ar basedir
+Upgrades the database disk layout after installing a new version.
+Only necessary if
+.Nm
+complains and demands it.
 .It Cm purge Ar basedir
 .It Cm purge Ar basedir
 Purges old data from the timeline of all users.
 Purges old data from the timeline of all users.
 .It Cm adduser Ar basedir Op uid
 .It Cm adduser Ar basedir Op uid

+ 9 - 0
doc/snac.8

@@ -69,6 +69,15 @@ startup scripts and configuration data in the
 directory.
 directory.
 For other operating systems, please read the appropriate documentation
 For other operating systems, please read the appropriate documentation
 on how to install a daemon as a non-root service.
 on how to install a daemon as a non-root service.
+.Ss Upgrading to a new version
+Sometimes, the database disk layout changes between versions. If there
+is such a change,
+.Nm
+will refuse to run and require an upgrade. Do this by running
+.Bd -literal -offset indent
+snac upgrade $HOME/snac-data
+.Ed
+.Pp
 .Ss Server Setup
 .Ss Server Setup
 .Pp
 .Pp
 An http server with TLS and proxying support must already be
 An http server with TLS and proxying support must already be