BackupPC.pod (BackupPC-4.3.2) | : | BackupPC.pod (BackupPC-4.4.0) | ||
---|---|---|---|---|
=encoding ISO8859-1 | =encoding ISO8859-1 | |||
=head1 BackupPC Introduction | =head1 BackupPC Introduction | |||
This documentation describes BackupPC version 4.3.2, | This documentation describes BackupPC version 4.4.0, | |||
released on 17 Feb 2020. | released on 20 Jun 2020. | |||
=head2 Overview | =head2 Overview | |||
BackupPC is a high-performance, enterprise-grade system for backing up | BackupPC is a high-performance, enterprise-grade system for backing up | |||
Unix, Linux, WinXX, and MacOSX PCs, desktops and laptops to a server's | Unix, Linux, WinXX, and MacOSX PCs, desktops and laptops to a server's | |||
disk. BackupPC is highly configurable and easy to install and maintain. | disk. BackupPC is highly configurable and easy to install and maintain. | |||
Given the ever decreasing cost of disks and raid systems, it is now | Given the ever decreasing cost of disks and raid systems, it is now | |||
practical and cost effective to backup a large number of machines onto | practical and cost effective to backup a large number of machines onto | |||
a server's local disk or network storage. For some sites this might be | a server's local disk or network storage. For some sites this might be | |||
skipping to change at line 669 | skipping to change at line 669 | |||
https://github.com/backuppc | https://github.com/backuppc | |||
Releases for BackupPC and the required packages BackupPC-XS and rsync-bpc are | Releases for BackupPC and the required packages BackupPC-XS and rsync-bpc are | |||
available at: | available at: | |||
https://github.com/backuppc/backuppc/releases | https://github.com/backuppc/backuppc/releases | |||
https://github.com/backuppc/backuppc-xs/releases | https://github.com/backuppc/backuppc-xs/releases | |||
https://github.com/backuppc/rsync-bpc/releases | https://github.com/backuppc/rsync-bpc/releases | |||
or on SourceForge: | ||||
https://sourceforge.net/projects/backuppc/files | ||||
=item BackupPC Wiki | =item BackupPC Wiki | |||
BackupPC has a Wiki at L<https://github.com/backuppc/backuppc/wiki>. | BackupPC has a Wiki at L<https://github.com/backuppc/backuppc/wiki>. | |||
Everyone is encouraged to contribute to the Wiki. Anyone with a | Everyone is encouraged to contribute to the Wiki. Anyone with a | |||
Github account can edit the Wiki. | Github account can edit the Wiki. | |||
=item Mailing lists | =item Mailing lists | |||
Three BackupPC mailing lists exist for announcements (backuppc-announce), | Three BackupPC mailing lists exist for announcements (backuppc-announce), | |||
developers (backuppc-devel), and a general user list for support, asking | developers (backuppc-devel), and a general user list for support, asking | |||
skipping to change at line 790 | skipping to change at line 786 | |||
you can expand the file system as necessary. | you can expand the file system as necessary. | |||
=item * | =item * | |||
Perl version 5.8.0 or later. If you don't have perl, please | Perl version 5.8.0 or later. If you don't have perl, please | |||
see L<http://www.cpan.org>. | see L<http://www.cpan.org>. | |||
=item * | =item * | |||
The perl modules BackupPC::XS (version >= 0.50) is required, and | The perl modules BackupPC::XS (version >= 0.50) is required, and | |||
several others, File::Listing, Archive::Zip, XML::RSS, Net::FTP, | several others, File::Listing, Archive::Zip, XML::RSS, JSON::XS, Net::FTP, | |||
Net::FTP::RetrHandle, Net::FTP::AutoReconnect are recommended. | Net::FTP::RetrHandle, Net::FTP::AutoReconnect are recommended. | |||
Try "perldoc BackupPC::XS" and "perldoc Archive::Zip" to see if you have these | Try "perldoc BackupPC::XS" and "perldoc Archive::Zip" to see if you have these | |||
modules. If not, fetch them from L<http://www.cpan.org> and see the | modules. If not, fetch them from L<http://www.cpan.org> and see the | |||
instructions below for how to build and install them. | instructions below for how to build and install them. | |||
The CGI Perl module is required for the http/cgi user interface. CGI was a core module, | The CGI Perl module is required for the http/cgi user interface. CGI was a core module, | |||
but from version 5.22 Perl no longer ships with it. | but from version 5.22 Perl no longer ships with it. | |||
=item * | =item * | |||
skipping to change at line 925 | skipping to change at line 921 | |||
apt-get install rsync-bpc | apt-get install rsync-bpc | |||
If those commands work, you can skip to Step 3. | If those commands work, you can skip to Step 3. | |||
Alternatively, manually fetching and installing BackupPC is easy. | Alternatively, manually fetching and installing BackupPC is easy. | |||
Start by downloading the latest version from | Start by downloading the latest version from | |||
https://github.com/backuppc/backuppc/releases | https://github.com/backuppc/backuppc/releases | |||
You can also download the distribution from L<https://sourceforge.net/projects/b | ||||
ackuppc/files>. | ||||
=head2 Step 2: Installing the distribution | =head2 Step 2: Installing the distribution | |||
Note: most information in this step is only relevant if you build | Note: most information in this step is only relevant if you build | |||
and install BackupPC yourself. If you use a package provided by a | and install BackupPC yourself. If you use a package provided by a | |||
distribution, the package management system should take of installing | distribution, the package management system should take of installing | |||
any needed dependencies. | any needed dependencies. | |||
First off, there are several perl modules you should install. The | First off, there are several perl modules you should install. The | |||
first one, BackupPC::XS, is required. The others are optional | first one, BackupPC::XS, is required. The others are optional | |||
but highly recommended. Use either your linux package manager, | but highly recommended. Use either your linux package manager, | |||
skipping to change at line 962 | skipping to change at line 956 | |||
=item Archive::Zip | =item Archive::Zip | |||
To support restore via Zip archives you will need to install | To support restore via Zip archives you will need to install | |||
Archive::Zip, also from L<http://www.cpan.org>. | Archive::Zip, also from L<http://www.cpan.org>. | |||
You can run "perldoc Archive::Zip" to see if this module is installed. | You can run "perldoc Archive::Zip" to see if this module is installed. | |||
=item XML::RSS | =item XML::RSS | |||
To support the RSS feature you will need to install XML::RSS, also from | To support the RSS feature you will need to install XML::RSS, also from | |||
L<http://www.cpan.org>. There is not need to install this module if you | L<http://www.cpan.org>. There is not need to install this module if you | |||
don't plan on using RSS. You can run "perldoc XML::RSS" to see if this | don't plan on using RSS. You can run "perldoc XML::RSS" to see if this | |||
module is installed. | module is installed. | |||
=item JSON::XS | ||||
To support the JSON formated metrics you will need to install JSON::XS, also fro | ||||
m | ||||
L<http://www.cpan.org>. There is not need to install this module if you | ||||
don't plan on using JSON formated metrics. You can run "perldoc JSON::XS" to see | ||||
if this | ||||
module is installed. | ||||
=item CGI | =item CGI | |||
The CGI Perl module is required for the http/cgi user interface. CGI was a core module, | The CGI Perl module is required for the http/cgi user interface. CGI was a core module, | |||
but from version 5.22 Perl no longer ships with it so you'll need to install it if you | but from version 5.22 Perl no longer ships with it so you'll need to install it if you | |||
are using a recent version of perl. | are using a recent version of perl. | |||
=item SCGI | =item SCGI | |||
The SCGI Perl module is required to use the S/CGI protocol for the http/cgi user interface. | The SCGI Perl module is required to use the S/CGI protocol for the http/cgi user interface. | |||
skipping to change at line 1017 | skipping to change at line 1018 | |||
https://github.com/backuppc/rsync-bpc/releases | https://github.com/backuppc/rsync-bpc/releases | |||
Then run these commands (updating the version number as appropriate): | Then run these commands (updating the version number as appropriate): | |||
tar zxf rsync-bpc-3.0.9.5.tar.gz | tar zxf rsync-bpc-3.0.9.5.tar.gz | |||
cd rsync-bpc-3.0.9.5 | cd rsync-bpc-3.0.9.5 | |||
./configure | ./configure | |||
make | make | |||
make install | make install | |||
Now let's move onto BackupPC itself. After fetching BackupPC-4.3.2.tar.gz, | Now let's move onto BackupPC itself. After fetching BackupPC-4.4.0.tar.gz, | |||
run these commands as root: | run these commands as root: | |||
tar zxf BackupPC-4.3.2.tar.gz | tar zxf BackupPC-4.4.0.tar.gz | |||
cd BackupPC-4.3.2 | cd BackupPC-4.4.0 | |||
perl configure.pl | perl configure.pl | |||
The configure.pl script also accepts command-line options if you | The configure.pl script also accepts command-line options if you | |||
wish to run it in a non-interactive manner. It has self-contained | wish to run it in a non-interactive manner. It has self-contained | |||
documentation for all the command-line options, which you can | documentation for all the command-line options, which you can | |||
read with perldoc: | read with perldoc: | |||
perldoc configure.pl | perldoc configure.pl | |||
Starting with BackupPC 3.0.0, the configure.pl script by default | Starting with BackupPC 3.0.0, the configure.pl script by default | |||
skipping to change at line 1262 | skipping to change at line 1263 | |||
=over 4 | =over 4 | |||
=item WinXX | =item WinXX | |||
One setup for WinXX clients is to set $Conf{XferMethod} to "smb". | One setup for WinXX clients is to set $Conf{XferMethod} to "smb". | |||
Actually, rsyncd is the better method for WinXX if you are prepared to | Actually, rsyncd is the better method for WinXX if you are prepared to | |||
run rsync/cygwin on your WinXX client. | run rsync/cygwin on your WinXX client. | |||
If you want to use rsyncd for WinXX clients you can find a pre-packaged | If you want to use rsyncd for WinXX clients you can find a pre-packaged | |||
zip file on L<http://backuppc.sourceforge.net>. The package is called | exe installer on L<https://github.com/backuppc/cygwin-rsyncd/releases>. | |||
cygwin-rsync. It contains rsync.exe, template setup files and the | The package is called cygwin-rsync. It contains rsync.exe, template setup files | |||
minimal set of cygwin libraries for everything to run. The README file | and the minimal set of cygwin libraries for everything to run. The README file | |||
contains instructions for running rsync as a service, so it starts | contains instructions for running rsync as a service, so it starts | |||
automatically everytime you boot your machine. If you use rsync | automatically everytime you boot your machine. If you use rsync | |||
to backup WinXX machines, be sure to set $Conf{ClientCharset} | to backup WinXX machines, be sure to set $Conf{ClientCharset} | |||
correctly (eg: 'cp1252') so that the WinXX filename encoding is | correctly (eg: 'cp1252') so that the WinXX filename encoding is | |||
correctly converted to utf8. | correctly converted to utf8. | |||
Otherwise, to use SMB, you can either create shares for the data you want | Otherwise, to use SMB, you can either create shares for the data you want | |||
to backup or your can use the existing C$ share. To create a new | to backup or your can use the existing C$ share. To create a new | |||
share, open "My Computer", right click on the drive (eg: C), and | share, open "My Computer", right click on the drive (eg: C), and | |||
select "Sharing..." (or select "Properties" and select the "Sharing" | select "Sharing..." (or select "Properties" and select the "Sharing" | |||
skipping to change at line 2564 | skipping to change at line 2565 | |||
User's can edit their host-specific configuration if enabled | User's can edit their host-specific configuration if enabled | |||
via $Conf{CgiUserConfigEditEnable}. The specific subset | via $Conf{CgiUserConfigEditEnable}. The specific subset | |||
of configuration settings that a user can edit is specified | of configuration settings that a user can edit is specified | |||
with $Conf{CgiUserConfigEdit}. It is recommended to make this | with $Conf{CgiUserConfigEdit}. It is recommended to make this | |||
list short as possible (you probably don't want your users saving | list short as possible (you probably don't want your users saving | |||
dozens of backups) and it is essential that they can't edit any | dozens of backups) and it is essential that they can't edit any | |||
of the Cmd configuration settings, otherwise they can specify | of the Cmd configuration settings, otherwise they can specify | |||
an arbitrary command that will be executed as the BackupPC | an arbitrary command that will be executed as the BackupPC | |||
user. | user. | |||
=head2 Metrics | ||||
BackupPC supports a metrics endpoint that expose common information | ||||
in a digest format. Allowed metrics formats are C<json> (default), | ||||
C<prometheus> and C<rss>. Format should be specified using C<format> | ||||
query parameter, a URL similar to this will provide metrics | ||||
information: | ||||
http://localhost/cgi-bin/BackupPC/BackupPC_Admin?action=metrics | ||||
http://localhost/cgi-bin/BackupPC/BackupPC_Admin?action=metrics?format=json | ||||
http://localhost/cgi-bin/BackupPC/BackupPC_Admin?action=metrics?format=prome | ||||
theus | ||||
http://localhost/cgi-bin/BackupPC/BackupPC_Admin?action=metrics?format=rss | ||||
JSON format requires the JSON::XS module to be installed. | ||||
RSS format requires the XML::RSS module to be installed. | ||||
This feature is experimental. The information included will | ||||
probably change. | ||||
=head2 RSS | =head2 RSS | |||
The RSS feed has been merged in the metrics endpoint (see section above). Please | ||||
use the metrics endpoint to access the RSS feed, as the old endpoint will be | ||||
deprecated. | ||||
BackupPC supports a very basic RSS feed. Provided you have the | BackupPC supports a very basic RSS feed. Provided you have the | |||
XML::RSS perl module installed, a URL similar to this will | XML::RSS perl module installed, a URL similar to this will | |||
provide RSS information: | provide RSS information: | |||
http://localhost/cgi-bin/BackupPC/BackupPC_Admin?action=rss | http://localhost/cgi-bin/BackupPC/BackupPC_Admin?action=rss | |||
This feature is experimental. The information included will | This feature is experimental. The information included will | |||
probably change. | probably change. | |||
=head1 BackupPC Design | =head1 BackupPC Design | |||
skipping to change at line 3114 | skipping to change at line 3138 | |||
=item xferMethod | =item xferMethod | |||
Set to the value of $Conf{XferMethod} when this dump was done. | Set to the value of $Conf{XferMethod} when this dump was done. | |||
=item level | =item level | |||
The level of this dump. A full dump is level 0. Currently incrementals | The level of this dump. A full dump is level 0. Currently incrementals | |||
are 1. In V4+ multi-level incrementals are no longer supported, so this | are 1. In V4+ multi-level incrementals are no longer supported, so this | |||
is just a 0 or 1. | is just a 0 or 1. | |||
=item charset | ||||
The client charset when this backup was made. | ||||
=item version | ||||
The BackupPC version when this backup was made. | ||||
=item inodeLast | ||||
The last inode number used in this backup. | ||||
=item keep | ||||
If set this backup won't be deleted. | ||||
=item share2path | ||||
Saves the value of $Conf{ClientShareName2Path} via Data::Dumper (with some tabs, | ||||
newlines and % characters replaced with %xx) so that the actual client path | ||||
for each share can be displayed when browsing. | ||||
=back | =back | |||
=item restores | =item restores | |||
A tab-delimited ascii table listing information about each requested | A tab-delimited ascii table listing information about each requested | |||
restore, one per row. The columns are: | restore, one per row. The columns are: | |||
=over 4 | =over 4 | |||
=item num | =item num | |||
skipping to change at line 3434 | skipping to change at line 3480 | |||
files generates a lot of unnecessary disk writes. So, provided | files generates a lot of unnecessary disk writes. So, provided | |||
BackupPC has a dedicated data disk, you should consider mounting | BackupPC has a dedicated data disk, you should consider mounting | |||
BackupPC's data directory with the noatime (or, with Linux kernels | BackupPC's data directory with the noatime (or, with Linux kernels | |||
>=2.6.20, relatime) attribute (see mount(1)). | >=2.6.20, relatime) attribute (see mount(1)). | |||
=head2 Some Limitations | =head2 Some Limitations | |||
BackupPC isn't perfect (but it is getting better). Please see | BackupPC isn't perfect (but it is getting better). Please see | |||
L<http://backuppc.sourceforge.net/faq/limitations.html> for a | L<http://backuppc.sourceforge.net/faq/limitations.html> for a | |||
discussion of some of BackupPC's limitations. | discussion of some of BackupPC's limitations. | |||
(Note, we should move this to the Github Wiki.) | (Note, this is old and we should move this to the Github Wiki.) | |||
=head2 Security issues | =head2 Security issues | |||
Please see L<http://backuppc.sourceforge.net/faq/security.html> for a | Please see L<http://backuppc.sourceforge.net/faq/security.html> for a | |||
discussion of some of various security issues. | discussion of some of various security issues. | |||
(Note, we should move this to the Github Wiki.) | (Note, this is old and we should move this to the Github Wiki.) | |||
=head1 Configuration File | =head1 Configuration File | |||
The BackupPC configuration file resides in __CONFDIR__/config.pl. | The BackupPC configuration file resides in __CONFDIR__/config.pl. | |||
Optional per-PC configuration files reside in __CONFDIR__/pc/$host.pl | Optional per-PC configuration files reside in __CONFDIR__/pc/$host.pl | |||
(or __TOPDIR__/pc/$host/config.pl in non-FHS versions of BackupPC). | (or __TOPDIR__/pc/$host/config.pl in non-FHS versions of BackupPC). | |||
This file can be used to override settings just for a particular PC. | This file can be used to override settings just for a particular PC. | |||
=head2 Modifying the main configuration file | =head2 Modifying the main configuration file | |||
skipping to change at line 3682 | skipping to change at line 3728 | |||
when files are added or deleted (fastest option) | when files are added or deleted (fastest option) | |||
1: recompute all the V4 pool size every night (slowest option) | 1: recompute all the V4 pool size every night (slowest option) | |||
2: recompute 1/2 the V4 pool size every night | 2: recompute 1/2 the V4 pool size every night | |||
4: recompute 1/4 the V4 pool size every night | 4: recompute 1/4 the V4 pool size every night | |||
8: recompute 1/8 the V4 pool size every night | 8: recompute 1/8 the V4 pool size every night | |||
16: recompute 1/16 the V4 pool size every night | 16: recompute 1/16 the V4 pool size every night | |||
(2nd fastest option; ensures the pool files sizes | (2nd fastest option; ensures the pool files sizes | |||
stay accurate after a few day, in case the relative | stay accurate after a few day, in case the relative | |||
upgrades miss a file) | upgrades miss a file) | |||
=item $Conf{PoolNightlyDigestCheckPercent} = 1; | ||||
Integrity check the pool files by confirming the md5 digest of the | ||||
contents matches their file name. Because the pool is very large, | ||||
only check a small random percentage of the pool files each night. | ||||
This is check if there has been any server file system corruption. | ||||
The default value of 1% means approximately 30% of the pool files | ||||
will be checked each month, although the actual number will be a | ||||
bit less since some files might be checked more than once in that | ||||
time. If BackupPC_nightly takes too long, you could reduce this | ||||
value. | ||||
=item $Conf{RefCntFsck} = 1; | =item $Conf{RefCntFsck} = 1; | |||
Reference counts of pool files are computed per backup by accumulating | Reference counts of pool files are computed per backup by accumulating | |||
the relative changes. That means, however, that any error will never be | the relative changes. That means, however, that any error will never be | |||
corrected. To be more conservative, we do a periodic full-redo of the | corrected. To be more conservative, we do a periodic full-redo of the | |||
backup reference counts (called an "fsck"). $Conf{RefCntFsck} controls | backup reference counts (called an "fsck"). $Conf{RefCntFsck} controls | |||
how often this is done: | how often this is done: | |||
0: no additional fsck | 0: no additional fsck | |||
1: do an fsck on the last backup if it is from a full backup | 1: do an fsck on the last backup if it is from a full backup | |||
skipping to change at line 4340 | skipping to change at line 4400 | |||
=item $Conf{ClientCharsetLegacy} = 'iso-8859-1'; | =item $Conf{ClientCharsetLegacy} = 'iso-8859-1'; | |||
Prior to 3.x no charset conversion was done by BackupPC. Backups were | Prior to 3.x no charset conversion was done by BackupPC. Backups were | |||
stored in whatever charset the XferMethod provided - typically utf8 | stored in whatever charset the XferMethod provided - typically utf8 | |||
for smbclient and the client's locale settings for rsync and tar (eg: | for smbclient and the client's locale settings for rsync and tar (eg: | |||
cp1252 for rsync on WinXX and perhaps iso-8859-1 with rsync on linux). | cp1252 for rsync on WinXX and perhaps iso-8859-1 with rsync on linux). | |||
This setting tells BackupPC the charset that was used to store filenames | This setting tells BackupPC the charset that was used to store filenames | |||
in old backups taken with BackupPC 2.x, so that non-ascii filenames in | in old backups taken with BackupPC 2.x, so that non-ascii filenames in | |||
old backups can be viewed and restored. | old backups can be viewed and restored. | |||
=item $Conf{ClientShareName2Path} = { }; | =item $Conf{ClientShareName2Path} = {}; | |||
Optionally map the share name to a different path on the client when the | Optionally map the share name to a different path on the client when the | |||
xfer program is run. This can be used if you create a snapshot on the client, | xfer program is run. This can be used if you create a snapshot on the client, | |||
which has a different path to the real share name. Or you could use simpler | which has a different path to the real share name. Or you could use simpler | |||
names for the share instead of a path (eg: root, home, usr) and map them to | names for the share instead of a path (eg: root, home, usr) and map them to | |||
the real paths here. | the real paths here. | |||
This should be a hash whose key is the share name used in $Conf{SmbShareName}, | This should be a hash whose key is the share name used in $Conf{SmbShareName}, | |||
$Conf{TarShareName}, $Conf{RsyncShareName}, $Conf{FtpShareName}, and the | $Conf{TarShareName}, $Conf{RsyncShareName}, $Conf{FtpShareName}, and the | |||
value is the string path name on the client. When a backup or restore is | value is the string path name on the client. When a backup or restore is | |||
skipping to change at line 4404 | skipping to change at line 4464 | |||
Full path for smbclient. Security caution: normal users should not | Full path for smbclient. Security caution: normal users should not | |||
allowed to write to this file or directory. | allowed to write to this file or directory. | |||
smbclient is from the Samba distribution. smbclient is used to | smbclient is from the Samba distribution. smbclient is used to | |||
actually extract the incremental or full dump of the share filesystem | actually extract the incremental or full dump of the share filesystem | |||
from the PC. | from the PC. | |||
This setting only matters if $Conf{XferMethod} = 'smb'. | This setting only matters if $Conf{XferMethod} = 'smb'. | |||
=item $Conf{SmbClientFullCmd} = '$smbClientPath \\\\$host\\$shareName' ... | =item $Conf{SmbClientFullCmd} = ... | |||
Command to run smbclient for a full dump. | Command to run smbclient for a full dump. | |||
This setting only matters if $Conf{XferMethod} = 'smb'. | This setting only matters if $Conf{XferMethod} = 'smb'. | |||
The following variables are substituted at run-time: | The following variables are substituted at run-time: | |||
$smbClientPath same as $Conf{SmbClientPath} | $smbClientPath same as $Conf{SmbClientPath} | |||
$host host to backup/restore | $host host to backup/restore | |||
$hostIP host IP address | $hostIP host IP address | |||
$shareName share name | $shareName share name | |||
$userName username | $userName username | |||
$fileList list of files to backup (based on exclude/include) | $fileList list of files to backup (based on exclude/include) | |||
$I_option optional -I option to smbclient | $I_option optional -I option to smbclient | |||
$X_option exclude option (if $fileList is an exclude list) | $X_option exclude option (if $fileList is an exclude list) | |||
$timeStampFile start time for incremental dump | $timeStampFile start time for incremental dump | |||
Note: all Cmds are executed directly without a shell, so the prog name | Note: all Cmds are executed directly without a shell, so the prog name | |||
needs to be a full path and you can't include shell syntax like | needs to be a full path and you can't include shell syntax like | |||
redirection and pipes; put that in a script if you need it. | redirection and pipes; put that in a script if you need it. | |||
=item $Conf{SmbClientIncrCmd} = '$smbClientPath \\\\$host\\$shareName' ... | =item $Conf{SmbClientIncrCmd} = ... | |||
Command to run smbclient for an incremental dump. | Command to run smbclient for an incremental dump. | |||
This setting only matters if $Conf{XferMethod} = 'smb'. | This setting only matters if $Conf{XferMethod} = 'smb'. | |||
Same variable substitutions are applied as $Conf{SmbClientFullCmd}. | Same variable substitutions are applied as $Conf{SmbClientFullCmd}. | |||
Note: all Cmds are executed directly without a shell, so the prog name | Note: all Cmds are executed directly without a shell, so the prog name | |||
needs to be a full path and you can't include shell syntax like | needs to be a full path and you can't include shell syntax like | |||
redirection and pipes; put that in a script if you need it. | redirection and pipes; put that in a script if you need it. | |||
=item $Conf{SmbClientRestoreCmd} = '$smbClientPath \\\\$host\\$shareName' ... | =item $Conf{SmbClientRestoreCmd} = ... | |||
Command to run smbclient for a restore. | Command to run smbclient for a restore. | |||
This setting only matters if $Conf{XferMethod} = 'smb'. | This setting only matters if $Conf{XferMethod} = 'smb'. | |||
Same variable substitutions are applied as $Conf{SmbClientFullCmd}. | Same variable substitutions are applied as $Conf{SmbClientFullCmd}. | |||
If your smb share is read-only then direct restores will fail. | If your smb share is read-only then direct restores will fail. | |||
You should set $Conf{SmbClientRestoreCmd} to undef and the | You should set $Conf{SmbClientRestoreCmd} to undef and the | |||
corresponding CGI restore option will be removed. | corresponding CGI restore option will be removed. | |||
skipping to change at line 4487 | skipping to change at line 4547 | |||
On the other hand, if you add --one-file-system to $Conf{TarClientCmd} | On the other hand, if you add --one-file-system to $Conf{TarClientCmd} | |||
you can backup each file system separately, which makes restoring one | you can backup each file system separately, which makes restoring one | |||
bad file system easier. In this case you would list all of the mount | bad file system easier. In this case you would list all of the mount | |||
points here, since you can't get the same result with | points here, since you can't get the same result with | |||
$Conf{BackupFilesOnly}: | $Conf{BackupFilesOnly}: | |||
$Conf{TarShareName} = ['/', '/var', '/data', '/boot']; | $Conf{TarShareName} = ['/', '/var', '/data', '/boot']; | |||
This setting only matters if $Conf{XferMethod} = 'tar'. | This setting only matters if $Conf{XferMethod} = 'tar'. | |||
=item $Conf{TarClientCmd} = '$sshPath -q -x -n -l root $host' ... | =item $Conf{TarClientCmd} = '$sshPath -q -x -n -l root $host env LC_ALL=C $tarPa th -c -v -f - -C $shareName+ --totals'; | |||
Command to run tar on the client. GNU tar is required. You will | Command to run tar on the client. GNU tar is required. You will | |||
need to fill in the correct paths for ssh2 on the local host (server) | need to fill in the correct paths for ssh2 on the local host (server) | |||
and GNU tar on the client. Security caution: normal users should not | and GNU tar on the client. Security caution: normal users should not | |||
allowed to write to these executable files or directories. | allowed to write to these executable files or directories. | |||
$Conf{TarClientCmd} is appended with with either $Conf{TarFullArgs} or | $Conf{TarClientCmd} is appended with with either $Conf{TarFullArgs} or | |||
$Conf{TarIncrArgs} to create the final command that is run. | $Conf{TarIncrArgs} to create the final command that is run. | |||
See the documentation for more information about setting up ssh2 keys. | See the documentation for more information about setting up ssh2 keys. | |||
skipping to change at line 4568 | skipping to change at line 4628 | |||
not use --atime-preserve in $Conf{TarClientCmd} above, | not use --atime-preserve in $Conf{TarClientCmd} above, | |||
otherwise resetting the atime (access time) counts as an | otherwise resetting the atime (access time) counts as an | |||
attribute change, meaning the file will always be included | attribute change, meaning the file will always be included | |||
in each new incremental dump. | in each new incremental dump. | |||
If you are running tar locally (ie: without rsh or ssh) then remove the | If you are running tar locally (ie: without rsh or ssh) then remove the | |||
"+" so that the argument is no longer shell escaped. | "+" so that the argument is no longer shell escaped. | |||
This setting only matters if $Conf{XferMethod} = 'tar'. | This setting only matters if $Conf{XferMethod} = 'tar'. | |||
=item $Conf{TarClientRestoreCmd} = '$sshPath -q -x -l root $host' ... | =item $Conf{TarClientRestoreCmd} = ... | |||
Full command to run tar for restore on the client. GNU tar is required. | Full command to run tar for restore on the client. GNU tar is required. | |||
This can be the same as $Conf{TarClientCmd}, with tar's -c replaced by -x | This can be the same as $Conf{TarClientCmd}, with tar's -c replaced by -x | |||
and ssh's -n removed. | and ssh's -n removed. | |||
See $Conf{TarClientCmd} for full details. | See $Conf{TarClientCmd} for full details. | |||
This setting only matters if $Conf{XferMethod} = "tar". | This setting only matters if $Conf{XferMethod} = "tar". | |||
If you want to disable direct restores using tar, you should set | If you want to disable direct restores using tar, you should set | |||
skipping to change at line 4620 | skipping to change at line 4680 | |||
$Conf{RsyncClientPath} = '/usr/bin/sudo /usr/bin/caffeinate -ism /usr/bin/ rsync'; | $Conf{RsyncClientPath} = '/usr/bin/sudo /usr/bin/caffeinate -ism /usr/bin/ rsync'; | |||
This setting only matters if $Conf{XferMethod} = 'rsync'. | This setting only matters if $Conf{XferMethod} = 'rsync'. | |||
=item $Conf{RsyncBackupPCPath} = ""; | =item $Conf{RsyncBackupPCPath} = ""; | |||
Full path to rsync_bpc on the server. Rsync_bpc is the customized | Full path to rsync_bpc on the server. Rsync_bpc is the customized | |||
version of rsync that is used on the server for rsync and rsyncd | version of rsync that is used on the server for rsync and rsyncd | |||
transfers. | transfers. | |||
=item $Conf{RsyncSshArgs} = [ ... ]; | =item $Conf{RsyncSshArgs} = ['-e', '$sshPath -l root']; | |||
Ssh arguments for rsync to run ssh to connect to the client. | Ssh arguments for rsync to run ssh to connect to the client. | |||
Rather than permit root ssh on the client, it is more secure | Rather than permit root ssh on the client, it is more secure | |||
to just allow ssh via a low-privileged user, and use sudo | to just allow ssh via a low-privileged user, and use sudo | |||
in $Conf{RsyncClientPath}. | in $Conf{RsyncClientPath}. | |||
The setting should only have two entries: "-e" and | The setting should only have two entries: "-e" and | |||
everything else; don't add additoinal array elements. | everything else; don't add additional array elements. | |||
This setting only matters if $Conf{XferMethod} = 'rsync'. | This setting only matters if $Conf{XferMethod} = 'rsync'. | |||
=item $Conf{RsyncShareName} = '/'; | =item $Conf{RsyncShareName} = '/'; | |||
Share name to backup. For $Conf{XferMethod} = "rsync" this should | Share name to backup. For $Conf{XferMethod} = "rsync" this should | |||
be a file system path, eg '/' or '/home'. | be a file system path, eg '/' or '/home'. | |||
For $Conf{XferMethod} = "rsyncd" this should be the name of the module | For $Conf{XferMethod} = "rsyncd" this should be the name of the module | |||
to backup (ie: the name from /etc/rsynd.conf). | to backup (ie: the name from /etc/rsynd.conf). | |||
skipping to change at line 4705 | skipping to change at line 4765 | |||
$hostIP IP address of host | $hostIP IP address of host | |||
$confDir configuration directory path | $confDir configuration directory path | |||
$shareName share name being backed up | $shareName share name being backed up | |||
This allows settings of the form: | This allows settings of the form: | |||
$Conf{RsyncArgsExtra} = [ | $Conf{RsyncArgsExtra} = [ | |||
'--exclude-from=$confDir/pc/$host.exclude', | '--exclude-from=$confDir/pc/$host.exclude', | |||
]; | ]; | |||
=item $Conf{RsyncFullArgsExtra} = [ ... ]; | =item $Conf{RsyncFullArgsExtra} = ['--checksum']; | |||
Additional arguments for a full rsync or rsyncd backup. | Additional arguments for a full rsync or rsyncd backup. | |||
The --checksum argument causes the client to send full-file checksum | The --checksum argument causes the client to send full-file checksum | |||
for every file (meaning the client reads every file and computes the | for every file (meaning the client reads every file and computes the | |||
checksum, which is sent with the file list). On the server, rsync_bpc | checksum, which is sent with the file list). On the server, rsync_bpc | |||
will skip any files that have a matching full-file checksum, and size, | will skip any files that have a matching full-file checksum, and size, | |||
mtime and number of hardlinks. Any file that has different attributes | mtime and number of hardlinks. Any file that has different attributes | |||
will be updating using the block rsync algorithm. | will be updating using the block rsync algorithm. | |||
In V3, full backups applied the block rsync algorithm to every file, | In V3, full backups applied the block rsync algorithm to every file, | |||
which is a lot slower but a bit more conservative. To get that | which is a lot slower but a bit more conservative. To get that | |||
behavior, replace --checksum with --ignore-times. | behavior, replace --checksum with --ignore-times. | |||
=item $Conf{RsyncIncrArgsExtra} = [ ... ]; | =item $Conf{RsyncIncrArgsExtra} = []; | |||
Additional arguments for an incremental rsync or rsyncd backup. | Additional arguments for an incremental rsync or rsyncd backup. | |||
=item $Conf{RsyncRestoreArgs} = [ ... ]; | =item $Conf{RsyncRestoreArgs} = [ ... ]; | |||
Arguments to rsync for restore. Do not edit the first set unless you | Arguments to rsync for restore. Do not edit the first set unless you | |||
have a thorough understanding of how File::RsyncP works. | have a thorough understanding of how File::RsyncP works. | |||
If you want to disable direct restores using rsync (eg: is the module | If you want to disable direct restores using rsync (eg: is the module | |||
is read-only), you should set $Conf{RsyncRestoreArgs} to undef and | is read-only), you should set $Conf{RsyncRestoreArgs} to undef and | |||
skipping to change at line 4744 | skipping to change at line 4804 | |||
substitutions: | substitutions: | |||
$client client name being backed up | $client client name being backed up | |||
$host hostname (could be different from client name if | $host hostname (could be different from client name if | |||
$Conf{ClientNameAlias} is set) | $Conf{ClientNameAlias} is set) | |||
$hostIP IP address of host | $hostIP IP address of host | |||
$confDir configuration directory path | $confDir configuration directory path | |||
Note: $Conf{RsyncArgsExtra} doesn't apply to $Conf{RsyncRestoreArgs}. | Note: $Conf{RsyncArgsExtra} doesn't apply to $Conf{RsyncRestoreArgs}. | |||
=item $Conf{RsyncRestoreArgsExtra} = []; | ||||
Additional arguments for an rsync or rsyncd restore. | ||||
This makes it easy to have per-client arguments. | ||||
=back | =back | |||
=head2 FTP Configuration | =head2 FTP Configuration | |||
=over 4 | =over 4 | |||
=item $Conf{FtpShareName} = ''; | =item $Conf{FtpShareName} = ''; | |||
Which host directories to backup when using FTP. This can be a | Which host directories to backup when using FTP. This can be a | |||
string or an array of strings if there are multiple shares per host. | string or an array of strings if there are multiple shares per host. | |||
skipping to change at line 4880 | skipping to change at line 4946 | |||
Archive Size Split | Archive Size Split | |||
Only for file archives. Splits the output into | Only for file archives. Splits the output into | |||
the specified size * 1,000,000. | the specified size * 1,000,000. | |||
e.g. to split into 650,000,000 bytes, specify 650 below. | e.g. to split into 650,000,000 bytes, specify 650 below. | |||
If the value is 0, or if $Conf{ArchiveDest} is an existing file or | If the value is 0, or if $Conf{ArchiveDest} is an existing file or | |||
device (e.g. a streaming tape drive), this feature is disabled. | device (e.g. a streaming tape drive), this feature is disabled. | |||
=item $Conf{ArchiveClientCmd} = '$Installdir/bin/BackupPC_archiveHost' ... | =item $Conf{ArchiveClientCmd} = ... | |||
Archive Command | Archive Command | |||
This is the command that is called to actually run the archive process | This is the command that is called to actually run the archive process | |||
for each host. The following variables are substituted at run-time: | for each host. The following variables are substituted at run-time: | |||
$Installdir The installation directory of BackupPC | $Installdir The installation directory of BackupPC | |||
$tarCreatePath The path to BackupPC_tarCreate | $tarCreatePath The path to BackupPC_tarCreate | |||
$splitpath The path to the split program | $splitpath The path to the split program | |||
$parpath The path to the par2 program | $parpath The path to the par2 program | |||
skipping to change at line 5496 | skipping to change at line 5562 | |||
=item $Conf{CgiImageDir} = ''; | =item $Conf{CgiImageDir} = ''; | |||
Directory where images are stored. This directory should be below | Directory where images are stored. This directory should be below | |||
Apache's DocumentRoot. This value isn't used by BackupPC but is | Apache's DocumentRoot. This value isn't used by BackupPC but is | |||
used by configure.pl when you upgrade BackupPC. | used by configure.pl when you upgrade BackupPC. | |||
Example: | Example: | |||
$Conf{CgiImageDir} = '/var/www/htdocs/BackupPC'; | $Conf{CgiImageDir} = '/var/www/htdocs/BackupPC'; | |||
=item $Conf{CgiExt2ContentType} = { }; | =item $Conf{CgiExt2ContentType} = {}; | |||
Additional mappings of filename extensions to Content-Type for | Additional mappings of filename extensions to Content-Type for | |||
individual file restore. See $Ext2ContentType in BackupPC_Admin | individual file restore. See $Ext2ContentType in BackupPC_Admin | |||
for the default setting. You can add additional settings here, | for the default setting. You can add additional settings here, | |||
or override any default settings. Example: | or override any default settings. Example: | |||
$Conf{CgiExt2ContentType} = { | $Conf{CgiExt2ContentType} = { | |||
'pl' => 'text/plain', | 'pl' => 'text/plain', | |||
}; | }; | |||
skipping to change at line 5562 | skipping to change at line 5628 | |||
=head1 Version Numbers | =head1 Version Numbers | |||
BackupPC uses a X.Y.Z version numbering system. The first digit is for | BackupPC uses a X.Y.Z version numbering system. The first digit is for | |||
major new releases, the middle digit is for significant feature releases | major new releases, the middle digit is for significant feature releases | |||
and improvements (most of the releases have been in this category). | and improvements (most of the releases have been in this category). | |||
=head1 Author | =head1 Author | |||
Craig Barratt <cbarratt@users.sourceforge.net> | Craig Barratt <cbarratt@users.sourceforge.net> | |||
See L<http://backuppc.sourceforge.net>. | See L<https://backuppc.github.io/backuppc/BackupPC.html>. | |||
=head1 Copyright | =head1 Copyright | |||
Copyright (C) 2001-2017 Craig Barratt | Copyright (C) 2001-2020 Craig Barratt | |||
=head1 Credits | =head1 Credits | |||
Ryan Kucera contributed the directory navigation code and images | Ryan Kucera contributed the directory navigation code and images | |||
for v1.5.0. He contributed the first skeleton of BackupPC_restore. | for v1.5.0. He contributed the first skeleton of BackupPC_restore. | |||
He also added a significant revision to the CGI interface, including | He also added a significant revision to the CGI interface, including | |||
CSS tags, in v2.1.0, and designed the BackupPC logo. | CSS tags, in v2.1.0, and designed the BackupPC logo. | |||
Xavier Nicollet, with additions from Guillaume Filion, added the | Xavier Nicollet, with additions from Guillaume Filion, added the | |||
internationalization (i18n) support to the CGI interface for v2.0.0. | internationalization (i18n) support to the CGI interface for v2.0.0. | |||
End of changes. 30 change blocks. | ||||
33 lines changed or deleted | 101 lines changed or added |