📄 manual.txt
字号:
where the copy is stored.. -s Dont try to resolve archive-info before backup or update of archive-info.. This may result in database inconsistency such as incorrect content-list's or archive-id's no longer existing. Use only if you want to set archive-info such as a new id on a blank tape. -t timestring Use this single time-string instead of TIME from the script. The time-string has the format... 'day of week number;hour;minute' Day of week number is 0(sun) to 6(sat). Ex. \'1,3,5;02;30\', mon, wed, fri, at 02.30. -u Update archive files that have changed, do not recreate the archive from scratch. -v Be extra verbose... -w Create an iso image with the targets instead of a (possibly compressed) tar archive, then write it to a blank cd. The archivename/devicename is the cd-writer device to use. -z Create an iso image with the targets instead of a (possibly compressed) tar archive, then write it to a rewriteable cd, which will be blanked before the write begins. The archivename/devicename is the cd-writer device to use. -y #count Retry operation if there is an error. This might be a good idea if you are using an older buggy or dirty drive. Default is no retry (0), but retry may be set to a number in the range [0;9] -x [list] A list of files or directory's to exclude from the backup. File-/directorynames must be separated by commas and no blankspaces. --rewind Overrule autodetection and force Sitback to operate the device as a rewinding device --nonrewind Overrule autodetection and force Sitback to operate the device as a not-rewinding device --mt Overrule autodetection and force Sitback to operate the device as a 'magnetic' tape device --nomt Overrule autodetection and force Sitback to operate the device as a 'not magnetic tape' device Restore operation sitback -r Restore has not yet been implemented. But the archives is regular tar archives, so you may use 'tar -x -P -f archivename|devicename' to restore the content of the archive. List operation sitback -l [scriptname] List operation has not yet been implemented. Other options sitback option [data] --scriptdir Directory where the script(s) is found.. --lock Set a lock file. Other instances of sitback will then refuse to start, thus preventing parallel instances of sitback.. (for the same user). --help Show the help screen. (You might want to do.. 'sitback --help | more') -f Disable curses based interface.. just use raw text.. -g Turn on debugging messages. Messages are logged to /tmp/sitback.debug or written on stderr. --version Show version.Are you confused ? Great!..Well... it is not that difficult as you might expect.. Go to the download page, thereis an example script. showing how you would write a script for automated backup's..To run sitback as a daemon, just type sitback -d data 'data' is the name of thescript, you may call it whatever you like..To run the same script, but only one time, ignoring the time-string,type sitback -n dataIf you have a new tape or disk that should be given its archive id just type sitback -i foo_cooperation_tape_007 -a /dev/st0This puts a default archive on the tape (in this example it is the /dev/st0 device),so that when you use the tape for automated backup's, it is included in the databasewith the archive-id 'foo_cooperation_tape_007'.A brief description of how to prepare to use a remote device..You can do 2 things.. either use the plain old rsh app. or you can usessh if you need encryption.. Important for both.. the machine withthe remote device must have the application rmt.. Then you must setup themachine with the type of remote shell you want to use..rsh (Please be aware of any potential decrease of your systems security) If you use pam, make sure you have /etc/pam.d/rsh and /etc/pam.d/rlogin.. They might look like this.... (Taken from a RedHat 7.2 installation) /etc/pam.d/rsh auth required /lib/security/pam_nologin.so auth required /lib/security/pam_securetty.so auth required /lib/security/pam_env.so account required /lib/security/pam_stack.so service=system-auth session required /lib/security/pam_stack.so service=system-auth /etc/pam.d/rlogin auth required /lib/security/pam_nologin.so auth required /lib/security/pam_securetty.so auth required /lib/security/pam_env.so auth required /lib/security/pam_stack.so service=system-auth account required /lib/security/pam_stack.so service=system-auth password required /lib/security/pam_stack.so service=system-auth session required /lib/security/pam_stack.so service=system-auth On a RedHat installation, you must install the 'rsh-server*' packages. (It includes the pam and xinetd configurations). Also on RedHat 7.x, you must edit the '/etc/xinetd.d/[rsh|rlogin|rexec]' files and change the line 'disable=yes' to 'disable=no'. You should also add the lines 'rsh', 'rlogin' and 'rexec' to /etc/securetty. On the remote host.. create/edit the file .rhosts in the users home directory, and add a line with the ip address or hostname of the host('s) that is allowed to use the device (log on using rsh).. Usually, you should not allow root to access a host via rsh.. Instead create a special user for backup.. You specify the username to tar by using a device name like user@host:device.. f.ex. 'operator@192.168.1.1:/dev/st0' Now, from the host that should use the remote device, try logging on as the user using rsh.... 'rsh -l 'ssh Create a set of keyfiles.... ssh-keygen ssh-keygen -d Copy those files to the remote host, into the directory '.ssh' in the home directory of the user you will log on as... ~/.ssh/identity to ~/.ssh/authorized_keys ~/.ssh/identity to ~/.ssh/authorized_keys2 With the keyfiles in place, you can do 2 things... The clumsy way of doing this is to remove the app 'rsh', and then symlink /usr/bin/rsh to ssh.. Much better, tell sitback to use ssh instead, by using the switch '-r' with ssh, or the script keyword 'RSH=ssh'..Error codesSitback will report one of these error codes in case of an failure.. It can beextracted from the shell, or read in the log 0 = succes 1 = invalid switch 2 = unexpected data, already a previous script name 3 = Script name exceeds 50 characters 4 = Missing switch data 5 = Invalid number format or overflow/underrun 6 = Unterminated string or string too long 7 = Invalid time-string 8 = No backup/restore script 9 = Unable to open temporary script 10 = No arguments 11 = Out of memory 12 = No files to backup or restore 13 = Error executing script 14 = Filetype not allowed 15 = Unable to list directory content 16 = Unable to obtain directory entry 17 = Unable to create temporary script 18 = Daemon mode not allowed without time-string 19 = Unable to start new thread for internal task 20 = Unable to print to smb printer 21 = Unable to locate smbclient from the samba package 22 = Filename too long for internal code 23 = Unable to print via 'lpr' 24 = File not found 25 = Create or overwrite not allowed for file 26 = No archive name or device 27 = Lock file detected 28 = Unable to open device or create archive 29 = Missing time-string 30 = Unable to write archiveid to file 31 = Unable to create database 32 = Unable to create new entry in the database 33 = Unable to open the archive list 34 = Unable to open database file 35 = Unable to open the archivename file 36 = Invalid format in archivename file 37 = Unable to rename database entry 38 = Unable to set status of database entry 39 = Updating or renaming archive id is not allowed in daemon mode 40 = Unable to prepare exec argument's array 41 = Unexpected system error 42 = Unable to detect, or bad permissions in homedir 43 = Missing Gnu tar 44 = Missing gzip 45 = Missing mt 46 = (OBSOLETE) Unable to set lock for random seed file in /var 47 = Unable to open seed file in /var 48 = Unable to become a daemon 49 = No archive name although needed 50 = Archive or device no longer available 51 = Argument is not a number 52 = Number is out of range 53 = Program reported an error 54 = Unable to create fifo 55 = Unknown compression tool 56 = Unable to enter message loop 57 = Compressed archives can not be updated 58 = Unable to create exclude list 59 = Unable to create directory needed for run-time housekeeping 60 = Unable to open the excludelist file 61 = Missing rsh 62 = Duplicated switch 63 = Invalid exclude list 64 = Unable to get required environment variable. 65 = Local and remote user mismatch.. (rsh requirement) 66 = Env. Var. USER not set 67 = Script parameter missing 68 = Unable to get user info from /etc/passwd 69 = Homedir does not exist 70 = (OBSOLETE) User does not have read permission on homedir 71 = (OBSOLETE) User does not have write permission on homedir 72 = (OBSOLETE) User does not have execute permission on homedir 73 = (OBSOLETE) User does not have read permission on ~/.sitback 74 = (OBSOLETE) User does not have write permission on ~/.sitback 76 = Unable to create .sitback directory 77 = Unable to list .sitback directory 78 = Error while trying to execute 'before' command 79 = Error while trying to execute 'after' command 80 = Unknown directive in script 81 = Requested compression tool not available 82 = Multi-volume archives can not be compressed 83 = User does not have sufficient permissions on the homedirectory 84 = User does not have sufficient permissions on the sitback homedirectory 85 = User does not have sufficient permissions on a file 86 = User does not have sufficient permissions on the specified archive or device 87 = Conflicting configuration switches/keywords 88 = Lockfile found 89 = Unable to execute remote command 90 = Remote device or file not allowed for filecopy based backup 91 = Remote device or file not allowed for iso cdrom based backup 92 = Missing 'mkisofs' 93 = Missing 'cdrecord' 94 = Remote device or file not allowed for tar based cd-r or cd-rw backup 95 = Invalid tempfile location 96 = Error while moving archive to cd. 97 = Multiple volumes not allowed for the selected operation 98 = Error while trying to open a file 99 = Unable to open report file 100 = Gnu Tar is version 1.13, which has the 'tapesize' bug. 101 = zip is not available, but is required for this operation. 254 = Internal error 255 = Internal limitation, not implemented or debug-mode only
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -