6. Archive management¶
6.1. Automatic archive management¶
kopano-archiver
can attach archive stores automatically, based on user attributes stored in LDAP or in Active Directory. When using this way of attaching stores, Kopano Archiver will create archive stores on the archive server and attach the user stores to these archive stores based on information found in LDAP or in Active Directory. When using this method of attaching and detaching Kopano WebApp will load archive stores automatically.
To use this feature, setting enable_auto_attach
must be set to yes
in /etc/kopano/archiver.cfg
:
enable_auto_attach = yes
Alternatively kopano-archiver
can be run periodically to perform the auto-attach operation:
kopano-archiver --auto-attach
6.1.1. Using OpenLDAP¶
To add an archive store to a user through LDAP, attribute kopanoUserArchiveServers
needs to be modified. This is a multi-value attribute, which needs to be set for the server name or server names of the servers that contain an archive store for the user.
A typical ldif (LDAP configuration file) would look like this:
Note
The archive store won’t be created or attached until the next run of kopano-archiver -A
with enable_auto_attach = yes
or kopano-archiver --auto-attach
.
6.1.2. Using Active Directory¶
To add an archive store to a user in Active Directory, one has to open the user in the Active Directory Users and Computers window and select the Kopano Features
tab.
Figure 5.1. ADS Features tab
Next, select the Archiver
feature and click Properties
. This will pop up the dialog in which the server names of the servers on which an archive store should exist for the selected user or users.
Figure 5.2. ADS Select archive servers
When a user has an automatic archive and the archiver feature in Active Directory is removed, the automatic archive will be automatically detached the first time an archive run is performed with auto-attach enabled. See also Removing an archive store.
Note
Archive stores won’t be created or attached until the next run of kopano-archiver -A
with enable_auto_attach = yes
in its configuration file or by running kopano-archiver --auto-attach
.
6.1.3. Listing attached archives¶
To see which archive stores are attached to a user’s primary store execute the following command:
kopano-archiver -u <user name> --list
This will output a list of attached archives. Each line contains the name of the archive store, the name of the folder that acts as root for the archive and the access rights the owner has for the archive store.
The store name will equal the name that was passed when the archive was attached. The archive folder name will be one of three things:
- it will be the full name of the user if no name was specified when the archive was attached
- if a name was specified, the archive folder will be that name
- if the archive was attached in a one-to-one configuration, it will be Root Folder.
The access rights will be Read Only when the archive was attached without write permissions. If it was attached with write access it will be Read/write. If the permissions were manually changed after the archive was attached, the rights field will display the configured role for the rights or all the rights if no matching role exists.
6.1.4. Detaching an archive¶
To detach an archive mailbox of a user, the archive server has to be removed in the Kopano feature tab.
Note
When detaching an archive that already contained archived and stubbed messages, the stubbed messages can still be opened.
6.1.5. Listing users that have an archive attached¶
To show which users have an archive attached execute the following command:
kopano-archiver --list-archiveusers
6.1.6. See details of an archive store¶
The details of an archive store can be obtained in two ways:
- By requesting the details of the user owning the archive:
# kopano-admin --details user1
Username: user1
Fullname: User 1
Emailaddress: user1@cluster.sio2
Active: yes
Administrator: no
Address book: Visible
Auto-accept meeting req:no
Home server: cnode-1
Last logon: 12/07/2015 03:41:32 PM
Last logoff: 12/07/2015 03:41:32 PM
Mapped properties:
PR_GIVEN_NAME User
PR_SURNAME One
PR_EC_ENABLED_FEATURES pop3
PR_EC_DISABLED_FEATURES imap
PR_EC_ARCHIVE_SERVERS cnode-2
Attached archives: 1
Root Folder in Archive - User 1 [Read Only]
Quota overrides: no
Warning level: unlimited
Soft level: unlimited
Hard level: unlimited
Current store size: 14.86 MiB
Groups (1):
Everyone
Archive details on node 'cnode-2':
Current store size: 114.68 MiB
All attached archive details are appended at the end.
- By explicitly requesting the archive details on a specific node:
# kopano-admin --details user1 --type archive --node cnode-2
Current store size: 114.68 MiB
Important
The node on which the archive is stored must be specified in order to find the archive.
These methods only apply to genuine archive stores. Details of regular stores that are manually attached as archives can be obtained by obtaining the details of the user owning that store:
# kopano-admin --details archive
Username: archive
Fullname: Archive Store
Emailaddress: archive@cluster.sio2
Active: no
Administrator: no
Address book: Hidden
Auto-accept meeting req:no
Home server: cnode-2
Last logon: 12/09/2011 03:41:32 PM
Last logoff: 12/09/2011 03:41:32 PM
Mapped properties:
PR_GIVEN_NAME Archive
PR_SURNAME Archive
PR_EC_ENABLED_FEATURES pop3
PR_EC_DISABLED_FEATURES imap
Quota overrides: no
Warning level: unlimited
Soft level: unlimited
Hard level: unlimited
Current store size: 114.68 MiB
Groups (1):
Everyone
6.1.7. Unhooking an archive store¶
An archive store can be unhooked the same way as a regular store, but with the addition of the type
and node
arguments:
# kopano-admin --unhook-store user1 --type archive --node cnode-2
Store unhooked.
6.1.8. Hooking an archive store¶
An archive store can be hooked the same way as a regular store, but with
the addition of the type
and node
arguments:
# kopano-admin --list-orphans --node cnode-2
Stores without users:
Store guid Guessed username Last login Store size Store type
-----------------------------------------------------------------------------------------------
F1A6BFCD67604B0FB733F746F1D00A91 user1 <unknown> 0 archive
# kopano-admin --hook-store F1A6BFCD67604B0FB733F746F1D00A91 -u user1 --type archive --node cnode-2
Store hooked.
6.1.9. Removing an archive store¶
An archive store can be removed the same way as a regular store, but with the addition of the type
and node
arguments:
# kopano-admin --unhook-store user1 --type archive --node cnode-2
Store unhooked.
# kopano-admin --list-orphans --node cnode-2
Stores without users:
Store guid Guessed username Last login Store size Store type
-----------------------------------------------------------------------------------------------
F1A6BFCD67604B0FB733F746F1D00A91 user1 <unknown> 0 archive
# kopano-admin --remove-store F1A6BFCD67604B0FB733F746F1D00A91 --node cnode-2
Store removed.