BackupPC-users

Re: [BackupPC-users] Wildcard support in BackupFilesOnly/BackupFilesExclude

2016-05-02 13:24:52
Subject: Re: [BackupPC-users] Wildcard support in BackupFilesOnly/BackupFilesExclude
From: Dmitry Katsubo <dma_k AT mail DOT ru>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Mon, 2 May 2016 19:23:35 +0200
On 2016-04-29 15:20, Bowie Bailey wrote:
> On 4/29/2016 7:04 AM, Dmitry Katsubo wrote:
>> Hello everyone,
>>
>> I wonder if there is any support for wildcards in
>> BackupFilesOnly/BackupFilesExclude
>> configuration options? This has been raised several times in this maillist
>> (see [1]-[5]) and seems to be a desired feature. However for me personally it
>> does not work. I am using BackupPC to backup files locally:
>>
>> Running: /usr/bin/sudo /bin/tar -c -v -f - -C /var --totals
>> --exclude=./proc ./lib/cacti ./lib/dpkg ./www/*.ini
>> full backup started for directory /var
>> Xfer PIDs are now 1662,1661
>> [ skipped 5680 lines ]
>> /bin/tar: ./www/*.ini: Cannot stat: No such file or directory
>>
>> BackupPC v3.3.1
>>
>> [1] https://sourceforge.net/p/backuppc/mailman/message/8072359/
>> [2] https://sourceforge.net/p/backuppc/mailman/message/8072369/
>> [3] https://sourceforge.net/p/backuppc/mailman/message/19273498/
>> [4] https://sourceforge.net/p/backuppc/mailman/message/19493568/
>> [5] https://sourceforge.net/p/backuppc/mailman/message/22116576/
> 
> Can you show us what your excludes look like in the backuppc config 
> file?  It looks like your exclude list is not being passed to tar 
> correctly.  Based on the syntax below, you are specifically backing up 
> /var/lib/cacti, /var/lib/dpkg, and /var/www/*.ini and only excluding 
> /var/proc.  The error is probably because there are no ini files in 
> /var/www.
> 
> I'm guessing that you have specified the excludes improperly in your 
> config file.

Actually I have cropped tar command line and removed almost all excludes.
They are inherited from /etc/backuppc/config.pl and are not overridden:

$Conf{BackupFilesExclude} = {
  '*' => [
    '/proc',
    '/sys',
    '/dev',
    '/tmp',
    '/media',
    '/lost+found',
    '/usr/src',
    '/var/lib/backuppc'
  ]
};

The .ini files are present, because if I "extend" the list they all
get into backup (I can browse and view them). The configuration that
works:

$Conf{BackupFilesOnly} = {
  '/var' => [
    'lib/cacti',
    'lib/dpkg',
    'www/users.ini',
    'www/files.ini'
  ]
};

This configuration does not work:

$Conf{BackupFilesOnly} = {
  '/var' => [
    'lib/cacti',
    'lib/dpkg',
    'www/*.ini'
  ]
};

Actually I have tried this one:

$Conf{BackupFilesOnly} = {
  '/var' => [
    'lib/cacti',
    'lib/dpkg',
    'www/*'
  ]
};

and it resulted the same error.
'www/*' resolves to many files for sure.

Thanks for looking into that.

-- 
With best regards,
Dmitry

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

<Prev in Thread] Current Thread [Next in Thread>