doc/web/source/upgrade/0.5-0.6.rst
changeset 579 be0906181a10
child 599 82e722f35aab
equal deleted inserted replaced
578:20141b967c0b 579:be0906181a10
       
     1 ======================
       
     2 Upgrading to vmm 0.6.x
       
     3 ======================
       
     4 This document describes the procedure to upgrade a vmm-0.5.2 installation
       
     5 to version 0.6.x
       
     6 
       
     7 If you still have installed vmm-0.4/vmm-0.4-r41 you have to proceed this
       
     8 step first:
       
     9 
       
    10  ‣ :doc:`0.4.x-0.5`
       
    11 
       
    12 Upgrading from vmm-0.5.2
       
    13 ------------------------
       
    14 
       
    15 Stop Postfix and Dovecot
       
    16 ^^^^^^^^^^^^^^^^^^^^^^^^
       
    17 Before updating your database layout you have to stop Postfix and Dovecot.
       
    18 
       
    19 .. code-block:: console
       
    20 
       
    21  root@host:~# /etc/init.d/postfix stop
       
    22  Stopping Postfix Mail Transport Agent: postfix.
       
    23  root@host:~# /etc/init.d/dovecot stop
       
    24  Stopping IMAP/POP3 mail server: dovecot.
       
    25 
       
    26 Create a database backup
       
    27 ^^^^^^^^^^^^^^^^^^^^^^^^
       
    28 It is always wise to back up your database from time to time.
       
    29 Particularly with regard to an impending structure modification.
       
    30 
       
    31 
       
    32 Example: Backing up the `mailsys` database with pg_dump_.
       
    33 
       
    34 .. code-block:: console
       
    35 
       
    36  user@host:~$ pg_dump -h localhost -U vmm -W mailsys > mailsys-0.5.2.sql
       
    37 
       
    38 Database update
       
    39 ^^^^^^^^^^^^^^^
       
    40 Connect as your `vmm` database user to your database.
       
    41 
       
    42 .. code-block:: console
       
    43 
       
    44  user@host:~$ psql mailsys vmm -W -h localhost
       
    45 
       
    46 In the PostgreSQL interactive terminal you have to run one of the following
       
    47 commands to perform the update.
       
    48 
       
    49 Dovecot v1.2.x/v2.0.x/v2.1.x
       
    50 """"""""""""""""""""""""""""
       
    51 .. code-block:: postgresql-console
       
    52 
       
    53  mailsys=> \i /path/to/vmm-0.6.0/pgsql/update_tables_0.5.x-0.6-dovecot-1.2.x.pgsql
       
    54  mailsys=> \q
       
    55 
       
    56 Dovecot v1.0.x/v1.1.x
       
    57 """""""""""""""""""""
       
    58 .. code-block:: postgresql-console
       
    59 
       
    60  mailsys=> \i /path/to/vmm-0.6.0/pgsql/update_tables_0.5.x-0.6.pgsql
       
    61  mailsys=> \q
       
    62 
       
    63 Set database permissions
       
    64 ^^^^^^^^^^^^^^^^^^^^^^^^
       
    65 .. include:: ../pgsql_set_permissionspermissions.rst
       
    66 
       
    67 Start Dovecot and Postfix again
       
    68 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       
    69 
       
    70 .. warning:: All the views (*dovecot_…* and *postfix_…*) have been
       
    71    replaced by database functions.
       
    72    So you have to adjust all your ``postfix/pgsql-*.cf`` files and also your
       
    73    ``/etc/dovecot/dovecot-sql.conf`` or ``/etc/dovecot/dovecot-sql.conf.ext``.
       
    74 
       
    75    See the `vmm-0.6.0/postfix/pgsql-*.cf` files and
       
    76    :ref:`Dovecot configuration <dovecot-sql-conf-ext>`/`dovecot-sql.conf.ext`
       
    77    or :ref:`Dovecot configuration <dovecot-sql-conf>`/`dovecot-sql-conf`.
       
    78 
       
    79 After a successfully update start Dovecot and Postfix again.
       
    80 
       
    81 .. code-block:: console
       
    82 
       
    83  root@host:~# /etc/init.d/dovecot start
       
    84  Starting IMAP/POP3 mail server: dovecot.
       
    85  root@host:~# /etc/init.d/postfix start
       
    86  Starting Postfix Mail Transport Agent: postfix.
       
    87 
       
    88 Upgrade vmm
       
    89 ^^^^^^^^^^^
       
    90 Finally execute the :file:`upgrade.sh` script.
       
    91 This will install the new code and also update your :file:`vmm.cfg`.
       
    92 
       
    93 .. code-block:: console
       
    94 
       
    95  root@host:~# cd /path/to/vmm-0.6.0
       
    96  root@host:/path/to/vmm-0.6.0# ./upgrade.sh
       
    97  Please have a look at your configuration: /usr/local/etc/vmm.cfg
       
    98  This are your Modified/Renamed/New settings:
       
    99  R   account.delete_directory = false
       
   100  R   account.directory_mode = 448
       
   101  R   account.disk_usage = false
       
   102  R   domain.delete_directory = false
       
   103  R   domain.directory_mode = 504
       
   104  R   domain.force_deletion = false
       
   105  R   domain.imap = true
       
   106  R   domain.pop3 = true
       
   107  R   domain.sieve = true
       
   108  R   domain.smtp = true
       
   109  R   domain.transport = dovecot:
       
   110  R   mailbox.folders = Drafts:Sent:Templates:Trash
       
   111  R   mailbox.root = Maildir
       
   112  R   misc.base_directory = /srv/mail
       
   113  M   misc.dovecot_version = 2.1.7
       
   114  R   misc.dovecot_version = 2.1.7
       
   115  R   misc.password_scheme = PLAIN
       
   116 
       
   117  Removed section "config" with option "done" (obsolte)
       
   118 
       
   119  Removed option "gid_mail" from section "misc" (obsolte)
       
   120 
       
   121 
       
   122 .. include:: ../ext_references.rst