Subject : 현대증권 Backup(rdist)

Description :


1. Overview

1) script에 아래내용을 기술

HOSTS=(root@hyundai3)
FILES=(/user)
${FILES} -> ${HOSTS}
        install /user2;

2) script생성후
/usr/ucb/rdist -f script-file

2. 현대증권 적용사례

* tcopy 하여 backup 을 먼저하고 update 되는부분을 rdist 로 sync.

1)tcopy
###########                      #############
 1.05G X 2                          2.1G X 1
###########                      #############
/dev/sd0a /       dump           /dev/sd1a  /back.root
/dev/sd0g /usr    dump           /dev/sd1g /back.usr
/dev/sd0h /home  -(cp)-------->  /dev/sd1h /back.home
/dev/sd3g /user1  (cp)           /dev/sd1e /back.user1
/dev/sd3h /user2  (cp)           /dev/sd1f /back.user2

tcopy 하면 2.1G 가 1.05G 가 되어버림.

2) 
vi test

HOSTS=(root@hds01)
FILES=(/home/hyun/DB/goagk)
${FILES} -> ${HOSTS}
        install -R /back.home/hyun/DB/gogak;
 
vi test1

HOSTS=(root@hds01)
FILES=(/home/hyun/bin)
${FILES} -> ${HOSTS}
        install -R /back.home/hyun/bin;
3) vi aaa
#!/bin/csh
/usr/ucb/rdist -f ./test
/usr/ucb/rdist -f ./test1

4) crontab
10 23 * * * ./aaa > /dev/console 2>&1

5)appendix

SYNOPSIS:
rdist except primitive needs parenthesis for multiple files

DETAIL DESCRIPTION:
Leaving out parentheses when specifying multiple files
for the "except" primitive will result in syntax errors.
The syntax is not clearly stated in rdist(1) man pages.

If you leave out the parentheses, you'll get the following message:

            machine:269 rdist -f distest
            rdist: line 5: syntax error
SOLUTION SUMMARY:

Add in parentheses.  See example below.

       Sample rdist file

       HOSTS = ( campus2 )
       FILES = (/usr/tmp/dist-test /usr/tmp/shmem /usr/tmp/shmem.c)

       ${FILES} -> ${HOSTS}
       install;
       except ( /usr/tmp/shmem /usr/tmp/shmem.c ); <======Parens are needed
       ${FILES} :: /usr/tmp/time
         notify yip@babyblues;


Revision History

작성일자 : 96.08.29
작성자 : 이승훈

수정일자 :
수정자 :