qmail 백업/복구 스크립트

관련 자료
Post Reply
junilove
등록 사용자
등록 사용자
Posts: 5
Joined: 2009/07/13 15:19

qmail 백업/복구 스크립트

Post by junilove » 2009/07/20 18:53

지난번 작업이 백업이 없어서 자료를 날려먹은 것을 교훈삼아....
qmail 백업에 대해 생각하던중, 찾은 스크립트입니다.

홈페이지 : http://v2gnu.com/qmail/backup-restore.html

테스트 서버에서 돌려보니 잘 동작합니다.
단,

[root@mail qmailbkup]# cat /home/vpopmail/etc/vpopmail.mysql
localhost|0|root|1q2w3e|vpopmail

위와 같이 vpopmail.mysql에 설정내용만 있어야 합니다. 기본 설정파일처럼 주석이 있으면 스크립트가 오류가 납니다.

기본값으로 실행하면
You must specify direct recipients with -s, -c, or -b. 와 같은 메시지를 볼 수있는데, 스크립트 소스에서 관리자 메일주소를 지정하거나, 사용안함으로 설정하면 됩니다.

[root@mail ~]# ls /backup/qmailbkup/200907201844-backup.tar.gz
[root@mail qmailbkup]# tar tvfz 200907201844-backup.tar.gz
-rw-r--r-- root/root 297 2009-07-20 18:44:36 200907201844-assign.tar.bz2
-rw-r--r-- root/root 1081 2009-07-20 18:44:35 200907201844-qmailcontrol.tar.bz2
-rw-r--r-- root/root 4721 2009-07-20 18:44:36 200907201844-vpopmail.sql.gz
-rw-r--r-- root/root 473 2009-07-20 18:44:35 200907201844-vpopmail.tar.bz2


백업하는 내용중 설정관련한 파일 리스트는 아래와 같습니다.

root@mail 1]# tar tvfj 200907201844-assign.tar.bz2
-rw-r--r-- root/root 586 2009-07-13 16:09:49 var/qmail/users/assign

[root@mail 1]# tar tvfj 200907201844-vpopmail.tar.bz2
drwx------ vpopmail/vchkpw 0 2009-07-13 16:09:49 home/vpopmail/domains/
drwx------ vpopmail/vchkpw 0 2009-07-13 16:52:40 home/vpopmail/domains/test.com/
drwx------ vpopmail/vchkpw 0 2009-07-13 16:52:40 home/vpopmail/domains/test.com/test/
drwx------ vpopmail/vchkpw 0 2009-07-13 16:52:40 home/vpopmail/domains/test.com/test/Maildir/
drwx------ vpopmail/vchkpw 0 2009-07-13 16:52:40 home/vpopmail/domains/test.com/test/Maildir/new/
drwx------ vpopmail/vchkpw 0 2009-07-13 16:52:40 home/vpopmail/domains/test.com/test/Maildir/tmp/
drwx------ vpopmail/vchkpw 0 2009-07-13 16:52:40 home/vpopmail/domains/test.com/test/Maildir/cur/
-rw------- vpopmail/vchkpw 55 2009-07-13 16:09:49 home/vpopmail/domains/test.com/.qmail-default
drwx------ vpopmail/vchkpw 0 2009-07-13 16:09:49 home/vpopmail/domains/test.com/postmaster/
drwx------ vpopmail/vchkpw 0 2009-07-14 10:05:02 home/vpopmail/domains/test.com/postmaster/Maildir/
-rw------- vpopmail/vchkpw 45 2009-07-14 10:05:02 home/vpopmail/domains/test.com/postmaster/Maildir/1247533502.qw
drwx------ vpopmail/vchkpw 0 2009-07-13 16:09:49 home/vpopmail/domains/test.com/postmaster/Maildir/new/
drwx------ vpopmail/vchkpw 0 2009-07-13 16:09:49 home/vpopmail/domains/test.com/postmaster/Maildir/tmp/
drwx------ vpopmail/vchkpw 0 2009-07-13 16:09:49 home/vpopmail/domains/test.com/postmaster/Maildir/cur/
[root@mail 1]# tar tvfj 200907201844-qmailcontrol.tar.bz2
-rw-r--r-- root/root 139 2009-07-13 16:09:49 rcpthosts
-rw------- root/root 0 2009-05-22 05:54:20 rcpthosts.lock
-rw-r--r-- root/root 192 2009-07-13 16:09:49 virtualdomains
-rw------- root/root 0 2009-05-22 05:54:20 virtualdomains.lock
-rw-r--r-- root/qmail 32 2009-06-25 10:52:50 badloadertypes
-rw-r--r-- root/root 2048 2009-06-26 02:11:46 badloadertypes.cdb
-rw-r--r-- root/qmail 25 2009-06-25 10:52:50 badmailfrom
-rw-r--r-- root/qmail 29 2009-06-25 10:52:50 badmailto
-rw-r--r-- root/qmail 360 2009-06-25 10:52:50 badmimetypes
-rw-r--r-- root/root 2048 2009-06-26 02:11:46 badmimetypes.cdb
-rw-r--r-- root/qmail 20 2009-06-25 10:52:50 blacklists
-rw-r--r-- root/qmail 4 2009-07-13 10:43:17 concurrencyincoming
-rw-r--r-- root/qmail 3 2009-07-13 10:43:17 concurrencyremote
-rw-r--r-- root/qmail 9 2009-06-25 10:52:50 databytes
-rw-r--r-- root/qmail 6 2009-07-13 10:43:17 queuelifetime
-rw-r--r-- root/qmail 32 2009-07-13 10:58:38 smtpgreeting
-rw-r--r-- root/qmail 0 2009-07-13 10:43:17 smtproutes
You do not have the required permissions to view the files attached to this post.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests