Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Zimbra Implement, Administer and Manage.pdf
Скачиваний:
73
Добавлен:
23.02.2016
Размер:
6.13 Mб
Скачать

This material is copyright and is licensed for the sole use by Kliwon Klimis on 28th October 2008 425 cilce, , frood, grradt, 525254

Backup and Restore

You just have to launch the restore procedure but instead of restoring to the same account, you'll choose to restore to a different account (see screenshot above). Once restored, go to the Account section, and double-click on the restored account (you want to put a new password to this restored account).

Once you've set up a new password, you can give the restored account informations to the CEO in order for him to get back his deleted mails. And once he's done, you can delete the restored account.

Although the GUI tools for backups are very simple, they do not offer a lot of flexibility. In the next section, we will look at two command line tools, zmbackup, zmrestore, and zmschedulebackup, to show how administrators could use additional functionality and change the default backup schedule.

Using the Command Line for Backups

Many systems administrators find it much easier to accomplish tasks with the

Command Line. Especially those of us that like to create shell scripts to accomplish our everyday tasks. In this section, we will go through backing up and restoring the Worker Bee account using the Command Line instead of the GUI. In this section, we will use all command line tools to complete the steps we did in the previous section.

1.You will need to log in as root to the server hosting the Zimbra Suite.

2.Change the user to Zimbra:

su – zimbra

3.Complete a full backup of the server by running zmbackup. We will use the

–f option meaning full backup, the –a which specifies the account to backup (in our case, we will use all), and –s which specifies the email server.

zmbackup –f –a all –s zimbra.emailcs.com

4. To delete the Worker Bee account, we will use zmprov as in: zmprov da worker@emailcs.com

5.Now, to restore the account, the tool is zmrestore. The –acct option specifies the account to restore and the –s specifies the email server. By default, zmrestore will use the most recent full backup.

zmrestore –acct worker@emailcs.com –s zimbra.emailcs.com

6.Open up a browser, and log in to the Zimbra Web Client and the Worker

Bee's account should be completely restored.

[ 190 ]

This material is copyright and is licensed for the sole use by Kliwon Klimis on 28th October 2008 425 cilce, , frood, grradt, 525254

Chapter 10

Using the Zimbra Command Line Interface (ZCLI) is a very quick and effective way to accomplish everyday administration tasks with very little effort and the best part, very few mouse-clicks. The last tool we need to explore is the zmschedulebackup tool.

In order to view or modify the schedule of the backups, you could use the zmschedulebackup tool. The information is stored in the same format as the Unix program Cron, so that each type of backup will have information in one of five columns representing the following:

Minute

Hour

Day of Month

Month

Day of Week

So, to see our current schedule that zmbackup is running in, we would issue the command (as the Zimbra user) zmschedulebackup –q.

The results should look something like this:

f 0 1 * * 6

i 0 1 * * 0-5

d 1m 0 0 * * 0

There are three lines here, one for the Full Backup schedule (f), the other for

Incremental (i), and the final one for deleting. Therefore, using our table above to determine the actual schedule for each:

The Full backup will run at 1:00am every Saturday:

Minute

Hour

Day of Month

Month

Day of Week

0

1

* every

* every

6 (Days are

 

 

 

 

0-6, with 0 being

 

 

 

 

Sunday)

The incremental backups will run:

 

 

Minute

Hour

Day of Month

Month

Day of Week

0

1

* every

* every

0-5 (every day

 

 

 

 

except Saturday)

The delete backup line is a little bit different as it states how long a backup should be kept before being deleted. So the 1m determines the backup should be saved for 1 month before being deleted. The rest of the line follows the same format as the other line and is scheduled to run every Sunday at 12:00am.

[ 191 ]

This material is copyright and is licensed for the sole use by Kliwon Klimis on 28th October 2008 425 cilce, , frood, grradt, 525254

Backup and Restore

Minute

Hour

Day of Month

Month

Day of Week

0

0

* every

* every

0 (Sunday)

To change the current schedule, for example, let's say we want to run full backups at 2:30am instead of 1:00am, and also change our incremental backups to run at 2:30am as well, we could issue the command (logged in as the Zimbra user):

zmschedulebackup -R f "30 2 * * 6" i "30 2 * * 0-5" d 1m "0 0 * * 0"

Since version 4.5.6, a mail is automatically sent to the administrator once a scheduled backup is finished. The administrator now knows if the backup was correctly performed (or not) without having to use the CLI tools to check.

A quick note on server upgrades and backup: when upgrading your Zimbra version, read the release notes carefully. In the past, some upgrades "broke" the backups as the new backup format was not compatible with the previous ones. This means it's not possible to restore an "old" backup onto a brand new upgraded server.

Don't forget to do a full backup right after you've upgraded.

Summary

This chapter explored the various ways the systems administrator could make sure that all mailboxes (including all of their information) are backed up on a regular and consistent basis. These backup files could be stored directly on the Zimbra server, or a better practice would be to copy them off to tape or another server so that if a hardware failure occurs, the backup could be used to restore to a new server. I urge you to read an excellent post in the Zimbra's blog about this:

http://www.zimbra.com/blog/archives/2007/02/45_admins_and_b_1.html.

Backups could also be used to restore specific mailbox accounts due to accidental deletion or if a user ends up deleting an important folder or group of contacts that need to be restored immediately.

In the next and final chapter of this book, we will look at the task of monitoring the Zimbra server, making sure as systems administrators we are being as proactive as possible.

[ 192 ]

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]