본문 바로가기

넋두리/linux 이야기

Bacula 설정과 사용하기 -Part III

Bacula 윈도우즈 클라이언트의 설치와 사용.

윈도우용 클라이언트의 설치 방법은 생략한다. 바보가 아니라면 누구라도 할 수 있을듯.

1. 윈도우 클라이언트(XP)의 설정

시작->모든프로그램->Bacula->Configuration->Edit Client Configuration

win-bacula

아래는 Bacula 클라이언트를  c:\Bacula 에 설치한 경우 client 설정화일이다.

FileDaemon { # this is me
Name = boxcorea-pc
FDport = 9102 # where we listen for the director
WorkingDirectory = “C:\Bacula\working”
Pid Directory = “C:\Bacula\working”
# Plugin Directory = “C:\Bacula\plugins”
Maximum Concurrent Jobs = 10
}

#
# List Directors who are permitted to contact this File daemon
#
Director {
Name = fox1-dir
Password = “디렉터의비밀번호와 같게 설정”
}

#
# Restricted Director, used by tray-monitor to get the
# status of the file daemon
#
Director {
Name = fox1-mon
Password = “모니터패스워드”
Monitor = yes
}

# Send all messages except skipped files back to Director
Messages {
Name = Standard
director = fox1-dir = all, !skipped, !restored
}

위와 같이 설정한 후, bacula client 서비스를 실행한다.

win-bacula2

그러면 아래와 같은  오류메시지가 나올 것이다.

“로컬 컴퓨터에서 Bacula File Backup Service를 시작하지 못했습니다. 오류 1067: 프로세스가 예기치 않게 종료되었습니다.”

bacula-3

 

물론 설정이 잘못되어 나오는 문제다. 나는 설정을 아래와 같이 바꾸어서 해결했다. 윈도우의 “\” 를 유닉스 스타일의 “/”로 바꾸어 주어야 한다.

FileDaemon { # this is me
Name = boxcorea-pc
FDport = 9102 # where we listen for the director
WorkingDirectory = “C:/Bacula/working”
Pid Directory = “C:/Bacula/working”
# Plugin Directory = “C:/Bacula/plugins”
Maximum Concurrent Jobs = 10
# FDAddress = 115.86.218.40
FDAddress = 192.168.100.20  #사설아이피를 사용한다면(즉, PC가 공유기 뒤에 있다면 실제 PC가 사용하는 IP를 사용해야한다)
}

#
# List Directors who are permitted to contact this File daemon
#
Director {
Name = fox1-dir
Password = “디렉터(백업서버)의 비밀번호”
}

#
# Restricted Director, used by tray-monitor to get the
# status of the file daemon
#
Director {
Name = fox1-mon
Password = “모니터의 비밀번호”  #설마, 정말로 ‘모니터의비밀번호’라고 넣지는 말자.
#Password = “iJnxPgnJ6sg5cF1NZoS57RMlSHS_-Raoe”
Monitor = yes
}

# Send all messages except skipped files back to Director
Messages {
Name = Standard
director = fox1-dir = all, !skipped, !restored
}

이렇게 설정을 바꾸고 다시 클라이언트 서비스를 실행하면, 이상없이 잘 작동할 것이다.

 

2. 백업서버(bacula-dir.conf)설정.

이제, 백업서버에서 위의 클라이언트를 백업하도록 설정한다.  기본적인 백업 설정은 이전의 Part I부분을 참고하면된다.

여기서는 추가되는 부분만 확인할 것이다. /etc/bacula/bacula-dir.conf 에 아래 내용을 추가한다.

# Windows Backup over the WAN
Client {
Name = boxcorea-pc
Address = 115.86.218.40   # 공유기를 사용할때 공유기의 WAN IP
FDPort = 9102
Catalog = MyCatalog
Password = “비밀번호…”
File Retention = 7 days
Job Retention = 1 Month
AutoPrune = yes
}
Job{
Name = “boxcorea-pc”
Type = Backup
Client = boxcorea-pc
FileSet = “WindowsClient”
Schedule = “WeeklyCycle”
Storage = File
Messages = Standard
Pool = File
Write Bootstrap = “/var/lib/bacula/tech.bsr”
}
FileSet {
Name = “WindowsClient”
Include {
Options {
signature = MD5
}
#File = “c:\Backup” # 이렇게 설정하면 오류는 나오지 않는다. 하지만 어떤 화일도 백업되지 않는다!!!
File = “c:/Backup”    # 이렇게 해야 제대로 백업된다. 윈도우라고 “\”를 쓰지는 말자.
}
}

bconsole을 통해 백업을 실행해 본다.

*st client

… 생략 …

JobId Level Files Bytes Status Finished Name
======================================================================
49 Full 1 0 OK 18-Jun-13 23:50 boxcorea-pc
50 Full 4 91.33 M OK 18-Jun-13 23:52 boxcorea-pc

 

'넋두리 > linux 이야기' 카테고리의 다른 글

Bacula 설정과 사용하기 -PartII  (0) 2013.10.01
Bacula catalog 백업 오류.  (0) 2013.10.01
heartbeat 설치 및 설정  (0) 2013.10.01
DRBD 설정  (0) 2013.10.01
리눅스 LV 설정  (0) 2013.10.01