.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 .\" .\" Standard preamble: .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' .\" expand to `' in nroff, nothing in troff, for use with C<>. .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .\" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "FSBACKUP 1" .TH FSBACKUP 1 "2004-05-24" "perl v5.8.8" "User Contributed Perl Documentation" .SH "NAME" fsbackup \- file system backup and synchronization utility. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& fsbackup.pl [options] .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\f(CW\*(C`fsbackup.pl\*(C'\fR is a incremental backup creation utility. \&\f(CW\*(C`fsbackup.pl\*(C'\fR support backup compression and encryption. Backup can be stored on local file system and on remote host stored over \s-1SSH\s0 or \s-1FTP\s0. Some addition scripts allow backups \s-1SQL\s0 tables from PostgreSQL and MySQL (\f(CW\*(C`pgsql_backup.sh\*(C'\fR and \f(CW\*(C`mysql_backup.sh\*(C'\fR)), save system configuration files and list of installed packages (\f(CW\*(C`sysbackup.sh\*(C'\fR). Backuped with \f(CW\*(C`fsbackup.pl\*(C'\fR files can be recovered by script \f(CW\*(C`fsrestore.sh\*(C'\fR, backuped with \f(CW\*(C`sysbackup.sh\*(C'\fR system packeges can be reinstalled by \f(CW\*(C`sysrestore.sh\*(C'\fR .SH "OPTIONS" .IX Header "OPTIONS" The following command-line options can be used with \f(CW\*(C`fsbackup.pl\*(C'\fR: .ie n .IP """\-n""" 4 .el .IP "\f(CW\-n\fR" 4 .IX Item "-n" Create new backup without checking files in previously stored hash. .ie n .IP """\-f""" 4 .el .IP "\f(CW\-f\fR" 4 .IX Item "-f" Create full backup, like as \f(CW\*(C`\-n\*(C'\fR option. .ie n .IP """\-h""" 4 .el .IP "\f(CW\-h\fR" 4 .IX Item "-h" Only rebuild hash, no storing files in backup archive. .ie n .IP """\-c""" 4 .el .IP "\f(CW\-c\fR" 4 .IX Item "-c" Clean incremental backup storage and create new full backup without checking \&\f(CW$cfg_increment_level\fR config parameter. .SH "ADDITION SCRIPTS" .IX Header "ADDITION SCRIPTS" .ie n .IP """create_backup.sh""" 4 .el .IP "\f(CWcreate_backup.sh\fR" 4 .IX Item "create_backup.sh" Backup planner running from \f(CW\*(C`crontab\*(C'\fR. For example: .Sp 18 4 * * * /usr/local/fsbackup/create_backup.sh .ie n .IP """install.pl""" 4 .el .IP "\f(CWinstall.pl\fR" 4 .IX Item "install.pl" Script to install fsbackup package and some required perl modules. .ie n .IP """fsbackup.pl""" 4 .el .IP "\f(CWfsbackup.pl\fR" 4 .IX Item "fsbackup.pl" File system backup utility. .ie n .IP """cfg_example""" 4 .el .IP "\f(CWcfg_example\fR" 4 .IX Item "cfg_example" Example of configuration file. .ie n .IP """scripts/pgsql_backup.sh""" 4 .el .IP "\f(CWscripts/pgsql_backup.sh\fR" 4 .IX Item "scripts/pgsql_backup.sh" .PD 0 .ie n .IP """scripts/mysql_backup.sh""" 4 .el .IP "\f(CWscripts/mysql_backup.sh\fR" 4 .IX Item "scripts/mysql_backup.sh" .PD Script for backup \s-1SQL\s0 tables from PostreSQL and MySQL. .ie n .IP """scripts/sysbackup.sh""" 4 .el .IP "\f(CWscripts/sysbackup.sh\fR" 4 .IX Item "scripts/sysbackup.sh" Script for store system configuration files and information about installed packages. .ie n .IP """scripts/fsrestore.sh""" 4 .el .IP "\f(CWscripts/fsrestore.sh\fR" 4 .IX Item "scripts/fsrestore.sh" Script for restore files backuped by \f(CW\*(C`fsbackup.pl\*(C'\fR. .ie n .IP """scripts/sysrestore.sh""" 4 .el .IP "\f(CWscripts/sysrestore.sh\fR" 4 .IX Item "scripts/sysrestore.sh" Script for reinstall packages stored by \f(CW\*(C`sysbackup.sh\*(C'\fR. .SH "CONFIGURATION FILE" .IX Header "CONFIGURATION FILE" .IP "\fB$cfg_backup_name\fR = 'test_host'" 4 .IX Item "$cfg_backup_name = 'test_host'" Name of backup, single word. .IP "\fB$cfg_cache_dir\fR = '/usr/local/fsbackup/cache'" 4 .IX Item "$cfg_cache_dir = '/usr/local/fsbackup/cache'" Path of internal cache directory for local backup method. .IP "\fB$prog_md5sum\fR = 'md5sum \-b'" 4 .IX Item "$prog_md5sum = 'md5sum -b'" .PD 0 .IP "\fB$prog_tar\fR = 'tar'" 4 .IX Item "$prog_tar = 'tar'" .IP "\fB$prog_ssh\fR = 'ssh'" 4 .IX Item "$prog_ssh = 'ssh'" .IP "\fB$prog_rm\fR = 'rm'" 4 .IX Item "$prog_rm = 'rm'" .IP "\fB$prog_gzip\fR = 'gzip'" 4 .IX Item "$prog_gzip = 'gzip'" .IP "\fB$prog_pgp\fR = 'gpg'" 4 .IX Item "$prog_pgp = 'gpg'" .PD Full path of some external program running from \f(CW\*(C`fsbackup.pl\*(C'\fR. \&\fB$prog_gzip = ''\fR \- not use compression, \fB$prog_pgp = ''\fR \- not use encryption. .IP "\fB$cfg_checksum\fR = 'timesize'" 4 .IX Item "$cfg_checksum = 'timesize'" File checksum method: .Sp timesize \- checksum of file attributes (default, best speed) .Sp md5 \- checksum of file attributes + \s-1MD5\s0 checksum of file content. .IP "\fB$cfg_backup_style\fR = 'backup'" 4 .IX Item "$cfg_backup_style = 'backup'" Backup style: .Sp backup \- incremental backup (copy only new and changed files). .Sp full_backup \- full backup (copy all files). .Sp sync \- file tree synchronization. .Sp hash \- hash creation without storing archive (spying for new or changed files). .IP "\fB$cfg_increment_level\fR = 7" 4 .IX Item "$cfg_increment_level = 7" Incremental level (after how many incremental copy make full refresh of backup) .IP "\fB$cfg_type\fR = 'remote_ssh'" 4 .IX Item "$cfg_type = 'remote_ssh'" Type of backup storage: .Sp .Vb 3 \& local - store backup on local file system. \& remote_ssh - store backup on remote host over SSH connection. \& remote_ftp - store backup on remote FTP server. .Ve .IP "\fB$cfg_remote_host\fR = 'backup\-server.test.ru'" 4 .IX Item "$cfg_remote_host = 'backup-server.test.ru'" .PD 0 .IP "\fB$cfg_remote_login\fR = 'backup_login'" 4 .IX Item "$cfg_remote_login = 'backup_login'" .IP "\fB$cfg_remote_path\fR = '/home/backup_login/backup'" 4 .IX Item "$cfg_remote_path = '/home/backup_login/backup'" .PD Connection parameters for remote_ssh storage type. .IP "\fB$cfg_remote_password\fR = 'Test1234'" 4 .IX Item "$cfg_remote_password = 'Test1234'" Password of remote login for remote_ftp storage type. .IP "\fB$cfg_remote_ftp_mode\fR = 0" 4 .IX Item "$cfg_remote_ftp_mode = 0" \&\s-1FTP\s0 transfer mode. 0 \- Active mode, 1 \- Passive mode. .IP "\fB$cfg_local_path\fR = '/var/backup/'" 4 .IX Item "$cfg_local_path = '/var/backup/'" Path of directory to store backup on local file system for local storage type. .IP "\fB$cfg_time_limit\fR = 0" 4 .IX Item "$cfg_time_limit = 0" Limit of file creation time in days. If not 0, don't backup files created or modified later then \f(CW$cfg_time_limit\fR (days). .IP "\fB$cfg_size_limit\fR = 0" 4 .IX Item "$cfg_size_limit = 0" Limit of maximum file size. If not 0, don't backup files witch size more then \&\f(CW$cfg_time_limit\fR kilobytes. .IP "\fB$cfg_root_path\fR = '/'" 4 .IX Item "$cfg_root_path = '/'" Root path for initial chdir. .IP "\fB$cfg_pgp_userid\fR = ''" 4 .IX Item "$cfg_pgp_userid = ''" Name of user in public key ring with public key will be used for \s-1PGP\s0 encryption. Not use encryption if not set. .IP "\fB$cfg_verbose\fR = 3" 4 .IX Item "$cfg_verbose = 3" Verbose level. .Sp .Vb 3 \& 0 - Silent mode, suspend all output, except fatal configuration errors. \& 1 - Output errors and warnings. \& 2 - Output all the available data. .Ve .IP "\fB$cfg_save_old_backup\fR = 1" 4 .IX Item "$cfg_save_old_backup = 1" Save previous backup to \s-1OLD\s0 directory before rotation or before storing full backup. .Sp .Vb 2 \& 0 - don't save old backup \& 1 - save old backup. .Ve .IP "\fB$cfg_maximum_archive_size\fR = 0" 4 .IX Item "$cfg_maximum_archive_size = 0" Size of maximum size (in KiloBytes) of single unpacked archive file (0 \- unlimited file size). .IP "\fB$cfg_stopdir_prune\fR = 0" 4 .IX Item "$cfg_stopdir_prune = 0" Recursive review of the prohibited directories. 0 \- Recursively to view all contents of directories marked for backup, including contents of directories prohibited by '!', '!d' and '=! rules. 1 \- not use a recursive entrance to directory prohibited for backup (speed is increased, reduces flexibility of customization). .IP "\fB_\|_DATA_\|_\fR \- list of backuped path and regexp mask." 4 .IX Item "__DATA__ - list of backuped path and regexp mask." .Vb 3 \& /dir[/file] - backup file or directory. \& !/dir[/file] - NOT include this file or directory to backup. \& # - ignore this line. .Ve .Sp Mask: .Sp .Vb 6 \& =~ - regexp mask for include file or directory to backup. \& f~ - regexp file mask for include file to backup. \& d~ - regexp directory mask for include directory to backup. \& =! - regexp mask for NOT include file or directory to backup. \& f! - regexp file mask for NOT include file to backup. \& d! - regexp directory mask for NOT include directory to backup. .Ve .Sp Operation priority: .Sp .Vb 8 \& 1. =! \& 2. f! \& 3. f~ \& 4. d! \& 5. =~ \& 6. d~ \& 7. !path \& 8. path .Ve .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (c) 2001 by Maxim Chirkov http://www.opennet.ru/dev/fsbackup/ .SH "BUGS" .IX Header "BUGS" Look \s-1TODO\s0 file. .SH "AUTHORS" .IX Header "AUTHORS" Maxim Chirkov