📄 install
字号:
make install.userrestore): rm -f $BASEDIR/client/bin/update_indexes ln $BASEDIR/client/bin/afrestore $BASEDIR/client/bin/update_indexes otherwise it must be copied like afrestore above: rm -f $BASEDIR/client/bin/update_indexes cp $BASEDIR/client/bin/full_backup $BASEDIR/client/bin/update_indexes chmod 4755 $BASEDIR/client/bin/update_indexes7) When the server has been configured properly, the following commands can be used to do backup, verify and restore: $BASEDIR/client/bin/full_backup to make a full backup $BASEDIR/client/bin/incr_backup to make an incremental backup $BASEDIR/client/bin/afverify to verify the latest backup $BASEDIR/client/bin/afrestore ... to make restores For more information see the INTRO file and the manual pages.Server Side-----------1) To build the distribution enter (on HP-UX preceded with ksh ): ./configure [ -prefix=/my/desired/install/path ] make server And see: Client Side (especially, if you want to use DES encryption for authentication, the same steps must be performed like explained above). The default installation path is /usr/local, /backup/server will be appended to this path. For the pre-2.11.5-defaults type /usr as install path. For Debian the default has hanged to /usr/local, but in these cases, where /usr/local is NOT local and used by several machines via NFS, I'd recommend to use the old default /usr or /opt or whatever is appropriate and *really* local.2) Install the files and programs Just enter: make install.server3) Add a service entry to the system This entry must be present in /etc/services. You have to select a port number (I suggest 2988, what is hexadecimal 0xbac (like backup ;-) ). The name of the service could be simply "afbackup". So you have to add the following line to /etc/services: afbackup 2988/tcp First check whether there is already an entry with port number 2988 for the TCP-protocol, but usually there is not. If you want to use the multi-stream server, I highly recommend to use an additional service for it. An entry like this may then be added to the /etc/services file: afmbackup 2989/tcp4) Add a user to the system, under whose ID the service will run (this makes sense for a server-only system. In all other cases this user should be root). This is usually done adding a line to /etc/passwd (before the NIS line starting with a +, if present): backup:x:2988:14:Backup Server:$BASEDIR/bu/server: In this entry the user's ID is 2988. Make sure that this ID does not already exist. If it does choose an unused ID.5) Tell the (x)inetd about the new service5a) Using inetd: The inetd-Superdaemon reads the file /etc/inetd.conf, so you have to add a line to this file. Assuming the service- name "afbackup" (made known in the file /etc/services) this line should be like this: afbackup stream tcp nowait <username> $BASEDIR/server/bin/afserver $BASEDIR/server/bin/afserver $BASEDIR/server/lib/backup.conf Where <username> is either the user you added to the system in case of a server-only host or root (see above). When using the multi-stream server for the second configured service, another correspoding line is necessary, that looks like this: afmbackup stream tcp wait <username> $BASEDIR/server/bin/afmserver $BASEDIR/server/bin/afmserver $BASEDIR/server/lib/backup.conf Note, that this line differs not only in the called program and the service name, but also in the way the inetd handles several calls for this service: column 4 is 'wait' instead of 'nowait', so only one multi stream server will run at a time.5b) Using xinetd: The xinetd-Superdaemon reads the file /etc/xinetd.conf, so you have to add a section to this file. Assuming the service- name "afbackup" (made known in the file /etc/services) this section should be like this:service afbackup{ flags = REUSE NAMEINARGS socket_type = stream protocol = tcp wait = no user = <username> server = /usr/local/afbackup/server/bin/afserver server_args = /usr/local/afbackup/server/bin/afserver /usr/local/afbackup/server/lib/backup.conf} Where <username> is either the user you added to the system in case of a server-only host or root (see above). The PATH entry is necessary, because it seems not to be possible to tell the xinetd, what argv[0] should be set during exec(2). When using the multi-stream server for the second configured service, another correspoding section is necessary, that looks like this:service afmbackup{ flags = REUSE NAMEINARGS socket_type = stream protocol = tcp wait = yes user = backup server = /usr/local/afbackup/server/bin/afmserver server_args = /usr/local/afbackup/server/bin/afmserver /usr/local/afbackup/server/lib/backup.conf} Note: It seems, xinetd offers a consistent and reasonable wait=yes mode, that we can rely on (in contrast to inetd behaviour on some commercial Unixes)6) Activate the service This is done by sending a HANGUP-signal to the (x)inetd process. Determine the process-ID of (x)inetd (ps -ef | grep inetd | grep -v grep on many systems, ps -uxa | grep inetd | grep -v grep on the others). Something like this will be output: root 431 1 0.0 Sep 27 ?? 0:00.35 /usr/sbin/inetd The second number in the line ending with inetd (and no grep) is the process ID. Then enter: kill -HUP <process-id> In the example case: kill -HUP 431 If xinetd is used instead of inetd, replace -HUP with -USR2 in the examples above.7) Test the availability of the service Enter: telnet localhost afbackup If you see a greeting message like: AF's backup server ready. everything is fine. You may try the same on the multi-stream port: telnet localhost afmbackup If you get an error message like: "afbackup: bad port number" something is wrong with the entry in /etc/services. If you get an error like: "... connection refused" inetd did not start the service. Look at the syslog file to find out what went wrong. Inetd error messages are usually found in the syslog file.8) Configure the server side To do this, run the program $BASEDIR/server/bin/serverconfig where BASEDIR is the install directory chosen with configure. Everything should be self-explanitory (help-command available)9) Give the afbackup service exclusive access to the tape This is simply done with chown <username> /dev/whatever chmod 600 /dev/whatever10) If you want the logfiles to reside in the /var-directory, move the $BASEDIR/server/var diretory to a subdiretory of /var with a name of your choice. I'd suggest /var/logs/backup/server . Then generate a symbolic link in $BASEDIR/server with the name var, that points to the newly created diretory under /var. e.g. enter: rmdir $BASEDIR/server/var mkdir -p /var/logs/backup/server ln -s $BASEDIR/server/var /var/logs/backup/server11) Run a basic test for the client/server authentication. On the client side run the following command: $BASEDIR/client/bin/afclient -h <servername> -qwv If an authentication key file has been configured, the option -k /path/to/keyfile must be supplied. If the server is not listening on the default port, also give the option -p <service-or-port>Remote Start Server Side------------------------1) To build the distribution enter (on HP-UX preceded with ksh ): ./configure [ -prefix /my/desired/install/path ] make And see: Client Side. Default installation path is /usr/local, /backup/server will be appended to the path. For the pre-2.11.5-defaults type /usr as install path. For Debian the default changed to /usr/local, but in these cases, where /usr/local is NOT local and used by several machines via NFS, I'd recommend to use the old default /usr or /opt or whatever may be found appropriate and *really* local.2) Install the files and programs Just enter: make install.rclient install.server3) Edit the file $BASEDIR/server/lib/backup.conf Change the entry in the line starting with "Program-directory", so it reflects your installation directory. This editing can be done using the program $BASEDIR/server/bin/serverconfig4) Configure (x)inetd to perform the remote start on request Follow steps 3, 5-11 of the server side installation. Use root for the user entry as the started client side must be able to read all data, that is subject of backup
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -