Re: [BackupPC-users] rsync exclusion list - apply to multiple shares

2016-08-31 Thread Holger Parplies
Hi,

cardiganimpatience wrote on 2016-08-19 06:24:24 -0700 [[BackupPC-users]  rsync 
exclusion list - apply to multiple shares]:
> [...]
> 
> $Conf{BackupFilesExclude} = {
>   '*' => [
> '*access_log*',
> '.apdisk',
> '*/.apdisk',
> '.cache'
>   ]

};

(supplied free of charge).

> Is there a method to make an exclusion list for all shares, even if
> individual shares have specific lists of their own?

That question doesn't make sense, but I presume you want a global exclusion
list that applies in addition to optional individual share lists. You can get
close to what you want, but you'll break the web configuration editor, or
rather, the web configuration editor will not correctly preserve your changes
if you use it on the host configuration file(s) in question.

You simply create a variable in the host (or even global) config file ...

my @common_excludes = ('*access_log*', '.apdisk', '*/.apdisk','.cache');

(I'm not sure what you are trying to achieve by listing '*/.apdisk' as well
as '.apdisk', though) and then referencing that multiple times:

$Conf {BackupFilesExclude} = {
'/home' => [ @common_excludes ],
'/var'  => [ @common_excludes, '/lib/mysql' ],
'/usr'  => [ @common_excludes ],
'/boot' => [ @common_excludes ],
'/data' => [ @common_excludes ],
};

or

$Conf {BackupFilesExclude} = {
'/var' => [ @common_excludes, '/lib/mysql' ],
'/example' => [ ], # no excludes here
'*'=> [ @common_excludes ],
};

> Would it be valid to list all shares in a common definition, and also break
> them out into individual lists like this:
> 
> $Conf{BackupFilesExclude} = {
>   '/home, /var, /usr, /boot, /data' => [
> '*access_log*',
> '.apdisk',
> '*/.apdisk',
> '.cache'
>   ]
> 
> $Conf{BackupFilesExclude} = {
>   '/var' => [
> '/lib/mysql'
> ]

Well, syntactically you are missing closing braces and a semicolon.
Semantically, you are assigning one value and then overwriting it with
another, just like in

$a = 'foo';
$a = 'bar';

For BackupPC, you are first creating an exclude list for a share with the
somewhat awkward name '/home, /var, /usr, /boot, /data' (which is "data"
within "boot, " within "usr, " within "var, " within "home, " within the
root directory), which is doubtlessly a valid path, just not one whose
name you'd like to quote to a shell.

So, no, that won't work for several reasons. Aside from that, it would also
break the web configuration editor.

> My list of files to exclude from every ShareName includes over 40 items
> so it's not trivial (or aesthetically pleasing) to append this list to
> each share definition.

Considering "trivial", I tend to disagree, at least with vi ;-). Consistently
*changing* the list might be a different matter. But I agree with your point.


As a side note, I believe you can prevent a host configuration file from
being edited (by the user) with the web configuration editor by setting

$Conf{CgiUserConfigEditEnable} = 0;

(inside the host configuration file). This might be advisable if you made
changes incompatible with the web configuration editor to prevent accidental
damage. Note, though, that this will probably not prevent an *admin* user
from clobbering the file with the web configuration editor.

Regards,
Holger

--
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] The graph is not showing on the main backuppc page

2016-08-31 Thread Alexander Moisseev
On 31.08.16 19:49, Orazio Di nino wrote:
> Sorry Alexander,
>
> my problem is as follows:
>
> In the CGI, instead of graphics, there are two unidentified icons.  The 
> permissions of pool.rdd are correct (-rw-r-  1 backuppc backuppc 11784 
> ago 31 01:03 pool.rrd).
> If I try to open the image in the CGI i get the following error : 
> http://192.168.2.90/backuppc/index.cgi?image=4 
>  cannot be displayed because 
> it contains errors.

Maybe you find something interesting in the web-server log.

I've seen such an error before, but I don't remember what caused the problem. I 
think CGI returns something else instead of image. If you are lucky it might be 
an error message. Try to save this object as file and inspect its content.

IP addresses in the tag and link don't match (192.168.2.90 != 192.168.15.2). 
Don't you think it's weird?


--
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] The graph is not showing on the main backuppc page

2016-08-31 Thread Orazio Di nino

Sorry Alexander,

my problem is as follows:

In the CGI, instead of graphics, there are two unidentified icons.  The 
permissions of pool.rdd are correct (-rw-r-  1 backuppc backuppc 
11784 ago 31 01:03 pool.rrd).
If I try to open the image in the CGI i get the following error : 
http://192.168.2.90/backuppc/index.cgi?image=4 
 cannot be displayed 
because it contains errors.


thanks and sorry English
Orazio

Il 31/08/2016 15:07, Alexander Moisseev ha scritto:


You didn't mention the problem you have.

Assuming you see image placeholders instead of empty graphs in the CGI:
1. Check current $LogDir and pool.rrd permissions with `ls -l` command. 
pool.rrd should be writable for backuppc user and readable for CGI user 
(commonly the same as backuppc user).
2. Modify the permissions appropriately using chown, chgrp, chmod.

In case you see empty graphs in the CGI after BackupPC installation - there is 
nothing to graph yet. Just wait for 2-3 days.

--
Alexander


--
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


--

TecnoSistemi S.r.l.
Servizi informatici per Aziende e Studi

Orazio Di nino

Viale della Repubblica, 70 c/o Sviluppo Italia - 67039 Sulmona (AQ)
( Tel: 800194055 +39 0864 2508313  +39 0864 578509  7 Fax: +39 0864 2508312

--
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] The graph is not showing on the main backuppc page

2016-08-31 Thread Alexander Moisseev
On 31.08.2016 13:41, Orazio Di nino wrote:
> Hi there,
>
> I performed the following tests to verify problems with rrdtools
> $ su >># cd $LogDir >># rrdtool info pool.rrd >># rrdtool dump pool.rrd | more
> $ su # sh # cd $LogDir # rrdtool graph /tmp/image.png --imgformat=PNG 
> --start=end-4w --end=-300 --title="BackupPC Pool Size (4 weeks)" --base=1000 
> --height=100 --width=600 --alt-autoscale-max --lower-limit=0 
> --vertical-label="" --slope-mode --font TITLE:10:Times --font AXIS:8:Times 
> --font LEGEND:8:Times --font UNIT:8:Times -c BACK#FF 
> DEF:ao="pool.rrd":ckb:AVERAGE CDEF:a=ao,1024,* AREA:a#95B8DB:"CPool in bytes" 
> GPRINT:a:LAST:"Current\\:%8.2lf %s" GPRINT:a:AVERAGE:"Average\\:%8.2lf %s" 
> GPRINT:a:MAX:"Maximum\\:%8.2lf %s\\n" I did the above and that worked just 
> fine...created a file called image.png and shows an empty graph. I read in 
> some post that CGI who should have permissions to read the file pool.rdd. But 
> how do I assign permissions ? thank you.
>

You didn't mention the problem you have.

Assuming you see image placeholders instead of empty graphs in the CGI:
1. Check current $LogDir and pool.rrd permissions with `ls -l` command. 
pool.rrd should be writable for backuppc user and readable for CGI user 
(commonly the same as backuppc user).
2. Modify the permissions appropriately using chown, chgrp, chmod.

In case you see empty graphs in the CGI after BackupPC installation - there is 
nothing to graph yet. Just wait for 2-3 days.

--
Alexander


--
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


[BackupPC-users] The graph is not showing on the main backuppc page

2016-08-31 Thread Orazio Di nino

Hi there,

I performed the following tests to verify problems with rrdtools
$ su >># cd $LogDir >># rrdtool info pool.rrd >># rrdtool dump pool.rrd 
| more
$ su # sh # cd $LogDir # rrdtool graph /tmp/image.png --imgformat=PNG 
--start=end-4w --end=-300 --title="BackupPC Pool Size (4 weeks)" 
--base=1000 --height=100 --width=600 --alt-autoscale-max --lower-limit=0 
--vertical-label="" --slope-mode --font TITLE:10:Times --font 
AXIS:8:Times --font LEGEND:8:Times --font UNIT:8:Times -c BACK#FF 
DEF:ao="pool.rrd":ckb:AVERAGE CDEF:a=ao,1024,* AREA:a#95B8DB:"CPool in 
bytes" GPRINT:a:LAST:"Current\\:%8.2lf %s" 
GPRINT:a:AVERAGE:"Average\\:%8.2lf %s" GPRINT:a:MAX:"Maximum\\:%8.2lf 
%s\\n" I did the above and that worked just fine...created a file called 
image.png and shows an empty graph. I read in some post that CGI who 
should have permissions to read the file pool.rdd. But how do I assign 
permissions ? thank you.



--

TecnoSistemi S.r.l.
Servizi informatici per Aziende e Studi

Orazio Di nino

Viale della Repubblica, 70 c/o Sviluppo Italia - 67039 Sulmona (AQ)
( Tel: 800194055 +39 0864 2508313  +39 0864 578509  7 Fax: +39 0864 2508312

--
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/