⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 manual.txt

📁 Linux系统备份源代码 可基于用户自定义策略实现系统、应用数据备份
💻 TXT
📖 第 1 页 / 共 3 页
字号:
There is a couple of examples at the bottom of the download page on thewebsite (http://www.mrbean.dk/)..Sitback has 3 modes of operation..    - Backup    - Restore    - ListThe default is Backup. This is also the operation mode that has the most availableconfiguration options since it is the prime operation mode.Most of the time, you will use sitback to backup.. Nobody wants to get to a pointwhere Restore is needed, but sometimes, we all get there.. That's life.. (so i hear!)Both Backup and Restore is based on a script located in the directory .sitback inthe users homedirectory. The script is a plain textfile containing keywords thattells sitback what,how,when and where...Sitback uses the .sitback as working directory, so if you do not prepend any pathto filenames, they will be created in .sitback in the users homedirectory..Most of what you put in the script can also be specified on the command-line, onlythe target files/directory's must be defined in the script...Before looking at the command-line options, let's go through the script content.(The script directives are case-insensitive, archive=ARCHIVE, but some of theconfiguration data, such as the archive name, is case-sensitive.)ARCHIVE    This is the name of the file or device to where the    archive should be written, or files restored from.    Local devices is either a file or a device name..  F.ex. /dev/st0 or    tmp/temp_backup.tar.gz..    Remote devices is a file or device name stated after the hostname    of the remote server..    The username can be given also, but the remote user must be equal    to the local user, automatic login via rsh will not work elsewise...    Examples...      backuphost:/dev/st0      backup@backuphost:/dev/nrt0      me@192.168.1.17:/tmp/temp_backup.tar.gz    If you need it (and are brave enough), you can allow sitback to run    suid, this will give access to devices not allowing access by non-root    users, but it will not allow access to files or directorys to which the    user does not have access.. (see sitback.h for details)    If you are creating a cd backup instead of a regular archive,    this must be the scsi device id which cdrecord should use..    This is most likely a set of numbers like '0,2,0', which designates    scsi-bus=0, target=2 LUN=0. It might be enough to use a 2 digit    number, my cd-writer f.ex. has the device id 0,0.    Check your bootlog or execute the command cdrecord -scanbus    to scan your scsi bus for devices..    Check the setup of you normal cd creation application, or your bootlog    to get the right number...    You can include substitutions in the archivename to generate    archives with names that includes the date and/or time of the backup...      %Y    =    Year      %M    =    Month (01-12)      %D    =    Day of month (01-31)      %h    =    Hour (00-23)      %m    =    Minute (00-59)      %s    =    Second (00-59)      %w    =    Day of week (0-6)ID    This is the id of the media you are backing up to.. Mostly for tapes,    or other rewriteable medias, but it also works for archives on disc, cd's etc.    The id is (supposed to be) a unique name for that particular tape/media.    F.ex. 'taastrup tape #1' or config. backup, 10 am.    If you do not give a media an id, it will get a default id composed by the    current date (much like a timestamp). This is ok for disc archives, or other    media's you will only write once (cd's f.ex), or if you do not need to    distinguish medias this way..    Please see the '-i' switch description for information on how to set a device    id manually.. If you do not need separate id's for each media, you can use    this script option, which sets the id on every media to the name you specify    here..TARGET    A target is a file or a directory that must be included in the archive.    You dont need any targets in the script to restore files from an archive,    but normally you would use the same script when you backup and restore...    Tar recurses directory's, so if you specify 'TARGET=/', you would get your    entire filesystem including any filesystems mounted somewhere in the path.    You may have as many targets as you like/need.    Sitback checks that you have access to those files before starting the    backup. Please note that Sitback checks access based on the current user,    not the current effective user, so even if Sitback is running suid root to    allow access to a device file or location, files unreachable by the user can    not be accessed..    Please note that if you add a target which is a local mounted smbshare,    located on another Unix host (Samba), symlinks on that other host does    not show up as symlinks when you mount the share, so sitback (tar)    blindly follows any symlinks present on that share, even if sitback is not    configured to follow symlinks. There is simply no way of detecting that a    directory was originally a symlink.COMPRESSION    Sitback does not by default compress the archive. Sometimes it is ok    to compress a backup, f.ex. if you have 3-5 tapes that is updated each    week, or the backup is a file on a local or remote filesystem, but the    decision to do so should only be taken after carefull consideradtion. it    is a bad idea to compress data on any magnetic media used for long term    storage, be that tapes or disks, but temporary disk archives or archives    on optical medias can (more) safely be compressed.    A single error anywhere in a compressed archive migh prevent    decompression of the whole archive. Such errors only destroy the data    present at the location of the error, while the rest of the archive can    safely be restored when not compressed..    'COMPRESSION=YES' enables compression    'COMPRESSION=NO' disables compression (default setting).    Sitback will use the best available compression method. If you have bzip2    on the system, this is the 1. choice. If bzip2 is not available, Sitback    looks for gzip, and if gzip is not available, Sitback looks for compress.    Compress is not very good for this task, but better than nothing.. But i    recommend that you get bzip2 if you plan to use compression.. By the way,    bzip2 uses a large amount of memory, and may consume a lot of your cpu    time, but you also gets a very good compression rate..    Dont worry if Sitback takes twice as long time with bzip2 than with gzip,    even on fast machines with lots of ram.COMPRESSOR    Instead of Sitback choosing the best available compression tool, you can    select a tool that is to be used (if available).. Use this directive if you    f.ex. wants to use gzip, although bzip2 is available on your system.. This    could be for improved speed, or to maintain compatibility with systems    without bzip2, or with little memory.    Choose one of the following compressors... GZIP, BZIP2, COMPRESS, ZIP.VERIFY    'VERIFY=YES' will make sitback verify the archive after a backup,    'VERIFY=NO' will make sitback skip verification of the newly created    archive (hint..: This is a really bad idea....!)    With standard verification, you get a message in case of errors, but    the backup continues if you should have an 'after' command. If you    instead specify VERIFY=STRICT, you will receive a fatal error and    processing will stop.. Use this only with vital data and on locations    that does not change during backup and verification.    You can also specify VERIFY=LAZY, you will still get all error messages in    the log and the report, but you will only receive an error warning    on fatal errors, mod time or size differences are ignored. Use this if you are    making an archive including webbrowser cache directorys or    mailboxes..    You can not verify a compressed multiple volumes archive...REPORTFILE    Gives the name of a file that gets a copy of the backup/restore report.    You can include substitutions in the report filename to generate    reports with names that includes the date and/or time of the backup...      %Y    =    Year      %M    =    Month (01-12)      %D    =    Day of month (01-31)      %h    =    Hour (00-23)      %m    =    Minute (00-59)      %s    =    Second (00-59)      %w    =    Day of week (0-6)REPORTPRINTER    Gives the name of the printer that should be used to print the    backup/restore report.    If the name begins with '//' or '\\\\' sitback assumes that it is a smb printer.    Sitback needs Samba to be able to print on a smb printer..    Else, sitback uses 'lpr' with the '-P' switch set to the given name...RSH    Tell sitback which application to use for remote shell access when using    a remote device for backup.SMBUSER    If you use a smb printer as 'REPORTPRINTER', you may have to specify    a username.SMBPASSWORD    If you use a smb printer as 'REPORTPRINTER', you may have to specify    a password. BE CAREFULL.. You will have an unencrypted password in    the script, this is one of the reasons it is good to let sitback run as 'root',    and then protect the scripts from any other user...VOLUMENAME    States the name of the backup you are doing. It goes into the archive,    It is mainly here to make it more easy for you to find your way around many    different archives using the database.. should you ever need that...    Blank spaces is allowed in the volume name, 256 characters max.TIME    Specify a time when the backup should run.. This also applies if you run    from the command-line, without the '-d' switch (called single mode), if    your script has a 'TIME' line, sitback will wait until that time before it runs..    This behaviour can be turned off with the '-n' switch.    The 'TIME'-string has the format..      day_of_week;hour;minute    day_of_week is a number in the range 0-6, 0 is sunday and 6 is satterday..    so the time, monday at 22:30 would give the 'TIME'-string      TIME=1;22;30    You can have as many 'TIME'-strings as you like. Should they overlap, one    of the backups would just not start until the previous one has finished.MULTIPLE VOLUMES    Enables sitback to create multiple volumes if the first device (f.ex. a tape)    has no more space left..    You will be prompted for the next volume..    Multiple volumes may also be requested from the command-line.    This option has no meaning for devices such as harddrives (you can not    change a harddrive when it runs out of space during a backup), only medias    like floppy disks, zip disks, tapes etc. is valid. Please note that this option    is also not suited for backups to a number of cd's or iso files.. (please look    at the VOLUMELENGTH option below instead)    Multiple volumes is not allowed in scheduled backups.. (the daemon can    not ask anyone to change tape at 03.45 in the night!!), or when running    unattended (UNATTENDED keyword).VOLUMELENGTH    Almost the same as 'MULTIPLE', but now sitback will not make the archives    larger than 'VOLUMELENGTH' bytes.. You must specify either an equal    number of 1024 bytes, or ##K or ##M wich represents respectively    KiloBytes and MegaBytes.    If you use the type TARISO, you will get a number of iso files with the    ARCHIVE-name + a number appended. F.ex. 'nightly_backup.iso#0',    'nightly_backup.iso#1',...'nightly_backup.iso#7'. where 'nightly_backup.iso'    is the original 'ARCHIVE' name given in the script.    If you use the type TARCDR or TARCDRW, use the 'VOLUMELENGTH' option    to specify the max. number of bytes available on the type of cd's used,    you will then get a number of cd's which together forms the full backup..    When creating an archive spanning more than one cd, you can not simply    restore the archive by inserting the cd's one after another, each cd contains    a, more or less, self standing tar archive. So you must extract the files you    want from the proper archive. Finding the right cd among 8 cd's can take    some time, so that's another reason for buying a dlt or dat unit if you    have so much data, and often need to restore from the archive.    As with MULTIPLE, this option is not allowed when running as a daemon.RETRY    Retry backup or restore if there is an error. Use this if your tapedrive is    an older model wich sometimes fails for no reason.    The retry count must be in the range [0;9] where 0 is no retry and 9 is    9 retry's, (1 initial run + 9 retry's).    F.ex..:      RETRY=3 sets a retry count of 3.FOLLOW SYMLINKS    Follow symbolic links.IGNORE BAD SYMLINKS    Ignore broken or looping symlinks.INCLUDE SPECIAL FILES    Include special files, such as fifo's or pipes.BEFORE    Run this command or script before backup.AFTER    Run this command or script after backup.EXCLUDE    Exclude this file or directory from the backup. You can have multiple    'EXCLUDE' statements, but only one file- or directoryname per statement.NICE    Specify adjustment of nice level.. regular users can only decrease the nice    level (range 0 to 19), root can also increase the nice level (boost priority),    (range -20 to 19)REWIND    If Sitback fails to detect if your device is of the rewinding or not-rewinding    type, you can override the autodetection and specify if the device is either    rewinding or not rewinding. (REWIND=YES or REWIND=NO).MTDEVICE    If Sitback fails to detect if your device is a magnetic tape or not, you can    override the autodetection and specify if the device is either a magnetic    tape device or not. (MTDEVICE=YES or MTDEVICE=NO).REPORTMAIL    If you want a copy of the backup report via email, add this keyword and    the recipient address..    F.ex..:      'REPORTMAIL=me@some.host'

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -