Re: [BackupPC-users] Late to the Game: Upgrading from Version 3.x on Fedora 25

2017-05-24 Thread Adam Goryachev

On 25/05/17 02:57, Richard Shaw wrote:
On Wed, May 24, 2017 at 10:53 AM, Tim Evans > wrote:


I have BackupPC-3.3.1-7.fc25.x86_64 installed on Fedora 25. Stopped
using it a good while back when the Samba changes screwed things up.
Could never get the patches to 3.x to work for me.  My backup pool is
now more than a year out of date.

(I have been running an alternative backup mechanism (NetGear ReadyNAS
built-in backups), with a separate destination, so the old pool isn't
important.)

I'd like to install version 4.x, but must've missed any step-by-steps
that have been published. I've found the Hobbes repo, but there's
nothing there in the way of docs.


The main thing is to merge config.pl . Your old one 
should not be overwritten and the new one from the 4.x package should 
be renamed to config.pl.rpmnew.


You can diff the two and merge what you need from the old one into the 
new one. The main difference being (IIRC) that the rsync path and 
rsync arguments being split into two different variables.


Something like:
# cd /etc/BackupPC
# mv config.pl  config.pl.old
# mv config.pl.rpmnew config.pl 
# diff -Nau config.pl.old config.pl  > changes.diff

Then review changes.diff and merge what you need over to the new 
config.pl 


It is a bit time consuming because the supplied default config.pl 
 and the changes made the first time you click save 
from the CGI interface create a lot of false positives in the diff.


Thanks,
Richard
In relation to this, it would be great if the original shipped config.pl 
was never modified, but there was a line at the bottom to either include 
a config_local.pl or all files contained in a directory named config.d
This would make upgrades *much* easier, since all your local edits are 
contained safely in a different file, so all you need to do is 
rename/adjust your custom settings if the variable name has changed/etc.


PS, this is already easy to do, as long as you never modify settings 
from the web, but it shouldn't be difficult to add this for the web 
editor to support the same concept.


I'm not sure what other distros do, but it appears this is being done 
for a lot of debian/ubuntu packages.


Regards,
Adam
--
Adam Goryachev Website Managers www.websitemanagers.com.au
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
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] Help with the schedule config

2017-05-24 Thread Kris Lou
I'll take a stab at it.

On Wed, May 24, 2017 at 5:41 AM, Yong Zhang  wrote:

> 1) I want servers to be backed up daily, but full backup only runs on
> Saturday, how?
>

AFAIK, there isn't an easy way to determine when specific backups
(full/incr) run. My understanding is that BackupPC runs within the context
of the blackout periods and client visibility, and executes full/incr
depending upon the expiration counts of the existing backups.

That being said, you could manually start a full backup on a Saturday and
hope for the best within a 7-day cycle.  Or you can set a cron job, but
then you're missing out on the ability to automatically stagger backups.

It just occurred to me, you could leverage a DumpPreUserCmd (combined with
UserCmdCheckStatus) to verify the day (Saturday), dump type (Full), and
exit status (Yes, it is) on whether or not to proceed.  I think that a
non-zero status here would put the client back into the queue, and it would
try the same dump again upon the next wake.  There are probably other
caveats -- like whether a client sitting in the queue for a long time might
have some existing backups expired and purged in the interim, but it's
something to consider.


> 2) I want servers to have incremental backup daily for 6 days then 1 full
> backup, and keep all these backups (inc/full) for one month, but after one
> month, I only need to keep weekly full backups for 180 days (that is about
> 24 full backups total), and after 180 days, I just want to keep full
> backups at monthly basis e.g. keep one full backup one month and 12 months
> total. Is this possible and how to set the values in config?
>

If I'm reading the docs right:
* FullPeriod = 7 days
* FullPeriod * 1 = 24 backups
* FullPeriod * 2 = 0 backups
* FullPeriod * 4 = 12 backups

So KeepFullCnt = [24,0,12], with IncKeepCnt=24.  This is a little more
Lunar and less Gregorian, but that's what we get for mixing weeks and
months.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
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] A cleanup question for orphaned backup directories.

2017-05-24 Thread Ray Frush
I've encountered an interesting issue:

In $TopDir/pc/host,   I have some orphaned directories that don't appear in
$TopDir/pc/host/backups.

For example:   this host shows two extra directories, and XferLOGs for
backup #5 and #6  that does not appear in the 'backups' file:

$ ls isxxt004
0   17  19  21  23  6  backups  LOCK  LOG.052017  RestoreInfo.0
  restores XferLOG.15.z  XferLOG.18.z  XferLOG.20.z  XferLOG.22.z
 XferLOG.5.z  XferLOG.8.z
15  18  20  22  5   8  backups.old  LOG.042017.z  refCnt
 RestoreLOG.0.z  XferLOG.0.z  XferLOG.17.z  XferLOG.19.z  XferLOG.21.z
 XferLOG.23.z  XferLOG.6.z  XferLOG.bad.z.old

$ cat isxxt004/backups | cut -f 1,2 -d '  '
0 full
8 incr
15 incr
17 incr
18 incr
19 full
20 incr
21 incr
22 incr
23 incr

The odd thing is that the LOG suggests that Backups #5 and #6 should have
been deleted:

...
2017-05-11 20:04:32 incr backup started for directory /
2017-05-11 20:08:38 incr backup 12 complete, 182376 files, 182376 bytes, 0
xferErrs (0 bad files, 0 bad shares, 0 other)
2017-05-11 20:08:38 Removing unfilled backup 3
2017-05-11 20:08:38 BackupPC_backupDelete: removing #3
2017-05-11 20:08:38 BackupPC_backupDelete: No prior backup for merge
2017-05-11 20:08:46 BackupPC_refCountUpdate: host isxxt004 got 0 errors
(took 7 secs)
2017-05-11 20:08:46 Finished BackupPC_backupDelete, status = 0 (running
time: 8 sec)
2017-05-12 20:03:29 incr backup started for directory /
2017-05-12 20:05:03 incr backup 13 complete, 182381 files, 182381 bytes, 0
xferErrs (0 bad files, 0 bad shares, 0 other)
2017-05-12 20:05:04 Removing unfilled backup 5
2017-05-12 20:05:04 BackupPC_backupDelete: removing #5
2017-05-12 20:05:04 BackupPC_backupDelete: No prior backup for merge
2017-05-12 20:05:08 BackupPC_refCountUpdate: host isxxt004 got 0 errors
(took 4 secs)
2017-05-12 20:05:08 Finished BackupPC_backupDelete, status = 0 (running
time: 4 sec)
2017-05-13 20:03:17 incr backup started for directory /
2017-05-13 20:05:20 incr backup 14 complete, 182388 files, 182388 bytes, 0
xferErrs (0 bad files, 0 bad shares, 0 other)
2017-05-13 20:05:20 Removing unfilled backup 6
2017-05-13 20:05:21 BackupPC_backupDelete: removing #6
2017-05-13 20:05:21 BackupPC_backupDelete: No prior backup for merge
2017-05-13 20:05:25 BackupPC_refCountUpdate: host isxxt004 got 0 errors
(took 4 secs)
2017-05-13 20:05:25 Finished BackupPC_backupDelete, status = 0 (running
time: 5 sec)
...

I'm looking for some advice on the best or safest way to clean up, or
re-link in the extra directories.
At this point, I'm not concerned about losing the incremental backup
history, and just want to get the '$TopDir/pc' tree into a consistent state.

Thanks!

-- 
Time flies like an arrow, but fruit flies like a banana.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
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] 4.1.2 CGI Wipes Config.pl Settings

2017-05-24 Thread Ray Frush
Michael-

This was very recently covered under the subject of "BackupFilesExclude
issue"   thread started by Mark Moorcroft.

A fix for the issue has been posted:

On Fri, May 12, 2017 at 11:21 AM, Craig Barratt  wrote:

> I pushed a fix
> 
>  for
> this last night.
> Craig
>

--
Ray Frush


On Wed, May 24, 2017 at 10:07 AM, Michael McGregor  wrote:

> Hello,
>
> I have a problem with the BackupFilesExclude setting not persisting or
> populating the website correctly.
>
> If I modify the BackupFilesExclude setting on the global config in the CGI
> interface, the settings make it into the config.pl correctly. But when I
> reload the global config webpage, the "values" for the hash are all gone.
> They are still in the config.pl file, but the CGI interface must not be
> parsing the setting correctly to populate the webpage. If I save any
> settings, the configuration is wiped out.
>
> I found this out the hard way as a server backup was backing up /proc when
> I found it.
>
> After editing the CGI interface to add the proper values, config.pl reads:
>
> $Conf{BackupFilesExclude} = {
>   '/' => [
> 'dev',
> 'media',
> 'mnt',
> 'proc',
> 'run',
> 'sys',
> 'tmp'
>   ]
> };
>
> After reediting the configuration through the CGI interface and saving,
> config.pl reads:
>
> $Conf{BackupFilesExclude} = {
>   '/' => []
> };
>
> Any advice?
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> 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/
>
>


-- 
Time flies like an arrow, but fruit flies like a banana.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
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] Late to the Game: Upgrading from Version 3.x on Fedora 25

2017-05-24 Thread Richard Shaw
On Wed, May 24, 2017 at 10:53 AM, Tim Evans  wrote:

> I have BackupPC-3.3.1-7.fc25.x86_64 installed on Fedora 25.  Stopped
> using it a good while back when the Samba changes screwed things up.
> Could never get the patches to 3.x to work for me.  My backup pool is
> now more than a year out of date.
>
> (I have been running an alternative backup mechanism (NetGear ReadyNAS
> built-in backups), with a separate destination, so the old pool isn't
> important.)
>
> I'd like to install version 4.x, but must've missed any step-by-steps
> that have been published. I've found the Hobbes repo, but there's
> nothing there in the way of docs.


The main thing is to merge config.pl. Your old one should not be
overwritten and the new one from the 4.x package should be renamed to
config.pl.rpmnew.

You can diff the two and merge what you need from the old one into the new
one. The main difference being (IIRC) that the rsync path and rsync
arguments being split into two different variables.

Something like:
# cd /etc/BackupPC
# mv config.pl config.pl.old
# mv config.pl.rpmnew config.pl
# diff -Nau config.pl.old config.pl > changes.diff

Then review changes.diff and merge what you need over to the new config.pl

It is a bit time consuming because the supplied default config.pl and the
changes made the first time you click save from the CGI interface create a
lot of false positives in the diff.

Thanks,
Richard
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
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] 4.1.2 CGI Wipes Config.pl Settings

2017-05-24 Thread Tony Schreiner
Not an answer to your question, but I would suggest adding
--one-file-system to your rsync or tar options, this will prevent all of
those directories from being taken

On Wed, May 24, 2017 at 12:07 PM, Michael McGregor  wrote:

> Hello,
>
> I have a problem with the BackupFilesExclude setting not persisting or
> populating the website correctly.
>
> If I modify the BackupFilesExclude setting on the global config in the CGI
> interface, the settings make it into the config.pl correctly. But when I
> reload the global config webpage, the "values" for the hash are all gone.
> They are still in the config.pl file, but the CGI interface must not be
> parsing the setting correctly to populate the webpage. If I save any
> settings, the configuration is wiped out.
>
> I found this out the hard way as a server backup was backing up /proc when
> I found it.
>
> After editing the CGI interface to add the proper values, config.pl reads:
>
> $Conf{BackupFilesExclude} = {
>   '/' => [
> 'dev',
> 'media',
> 'mnt',
> 'proc',
> 'run',
> 'sys',
> 'tmp'
>   ]
> };
>
> After reediting the configuration through the CGI interface and saving,
> config.pl reads:
>
> $Conf{BackupFilesExclude} = {
>   '/' => []
> };
>
> Any advice?
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> 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/
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
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] Late to the Game: Upgrading from Version 3.x on Fedora 25

2017-05-24 Thread Tim Evans
I have BackupPC-3.3.1-7.fc25.x86_64 installed on Fedora 25.  Stopped 
using it a good while back when the Samba changes screwed things up. 
Could never get the patches to 3.x to work for me.  My backup pool is 
now more than a year out of date.

(I have been running an alternative backup mechanism (NetGear ReadyNAS 
built-in backups), with a separate destination, so the old pool isn't 
important.)

I'd like to install version 4.x, but must've missed any step-by-steps 
that have been published. I've found the Hobbes repo, but there's 
nothing there in the way of docs.

As noted, the backup pool is quite old and I don't really care about it, 
but I do want to keep the existing config.

Can someone point me to an upgrade recipe?  Thanks.
-- 
Tim Evans   |5 Chestnut Court
443-394-3864|Owings Mills, MD 21117

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
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] 4.1.2 CGI Wipes Config.pl Settings

2017-05-24 Thread Michael McGregor
Hello,

I have a problem with the BackupFilesExclude setting not persisting or
populating the website correctly.

If I modify the BackupFilesExclude setting on the global config in the CGI
interface, the settings make it into the config.pl correctly. But when I
reload the global config webpage, the "values" for the hash are all gone.
They are still in the config.pl file, but the CGI interface must not be
parsing the setting correctly to populate the webpage. If I save any
settings, the configuration is wiped out.

I found this out the hard way as a server backup was backing up /proc when
I found it.

After editing the CGI interface to add the proper values, config.pl reads:

$Conf{BackupFilesExclude} = {
  '/' => [
'dev',
'media',
'mnt',
'proc',
'run',
'sys',
'tmp'
  ]
};

After reediting the configuration through the CGI interface and saving,
config.pl reads:

$Conf{BackupFilesExclude} = {
  '/' => []
};

Any advice?
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
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] Help with the schedule config

2017-05-24 Thread Yong Zhang
Hi, all

I'm new to BackupPC, I installed v4.0 these days, but hard to understand 
schedule settings, I have some queries here:

1) I want servers to be backed up daily, but full backup only runs on Saturday, 
how?
2) I want servers to have incremental backup daily for 6 days then 1 full 
backup, and keep all these backups (inc/full) for one month, but after one 
month, I only need to keep weekly full backups for 180 days (that is about 24 
full backups total), and after 180 days, I just want to keep full backups at 
monthly basis e.g. keep one full backup one month and 12 months total. Is this 
possible and how to set the values in config?

Thanks for the help.

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
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/