[BackupPC-users] config.pl "built-in" script to backup Windows shares with Virtual Shadow Service Copy

2020-06-29 Thread
Over the years, many have asked and struggled with backing up remote
Windows shares with shadow copies. Shadow copies are useful since they
allow both the backup to be 'consistent' and allow for reading files
that are otherwise 'busy' and unreadable when part of active Windows
partitions.

Various solutions (including one I proposed almost a decade ago) use
additional scripts and hacks to create the shadow copy.
Such solutions are kludgy and require the maintenance of separate
scripts either on the server or client.

I have written a combination of perl and bash code that can be stored
in the host.pl configuration file that does everything you need to
automagically create shadow copies for each share (where possible)
with minimal to no special configuration in host.pl and nothing to
configure on the Windows client (other than having cygwin+ssh+rsync
and an accessible account on your Windows client).

The only thing you need to do is to set up the hash
Conf{ClientShareName2Path} to map share names to their 
(unshadowed) Windows paths. The attached script will then set up and
interpolate the appropriate shadow paths.

It should just work...
Just cut-and-paste the attachment into your host.pl code for Windows
clients.

Note: I included a fair amount of debugging & error messages in case
any shadows or links fail to get created or unwound.



BackupPCShadowConfig.pl
Description: Binary data
___
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] [BackupPC-devel] BackupPC 4.4.0 released

2020-06-29 Thread Mike Hughes
For what it's worth, I was able to resolve this (for now) by updating CPAN 
itself. I noticed when running certain commands that it complained that CPAN 
was at version 1.x and version 2.28 was available. It suggested running:
install CPAN
reload cpan

But those are clearly not bash commands. They need to be run in the CPAN shell:
# perl -MCPAN -e shell

After completing, I again ran the following as the backuppc user and it 
reported the correct version:
$ /usr/bin/perl -e 'use BackupPC::XS; print("$BackupPC::XS::VERSION\n")'
0.62

This is likely not the best way to resolve a mismatched cpan module version but 
it does appear to have worked for me, for now. I promise not to complain next 
time an update comes through and I end up having to rebuild from .iso 

From: Craig Barratt via BackupPC-users 
Sent: Thursday, June 25, 2020 5:43 PM
To: General list for user discussion, questions and support 

Cc: Craig Barratt 
Subject: Re: [BackupPC-users] [BackupPC-devel] BackupPC 4.4.0 released

You can install the perl module Module::Path to find the path for a module.

After installing, do this:
perl -e 'use Module::Path "module_path"; 
print(module_path("BackupPC::XS")."\n");'

Example output:
/usr/local/lib/x86_64-linux-gnu/perl/5.26.1/BackupPC/XS.pm

Now try as root and the BackupPC user to see the difference.  Does the BackupPC 
user have permission to access the version root uses?

You can also print the module search path with:
perl -e 'print join("\n", @INC),"\n"'

Does that differ between root and the BackupPC user?

Craig

On Thu, Jun 25, 2020 at 9:48 AM Les Mikesell 
mailto:lesmikes...@gmail.com>> wrote:
> The system got itself into this state from a standard yum update.

That's why you want to stick to all packaged modules whenever
possible.   Over time, dependencies can change and the packaged
versions will update together.  You can probably update a cpan module
to the correct version manually but you need to track all the version
dependencies yourself.   There are some different approaches to
removing modules: https://www.perlmonks.org/?node_id=1134981


___
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 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] backuppc process will not stop

2020-06-29 Thread Mark Maciolek
hi,
  You think I would have run across this with all the Linux systems I
administer but I had not. You are correct systemctl stop worked.

Thank you.

Mark

> Mark,
>
> Perhaps systemd is being used to run BackupPC?
>
> What output do you get from:
>
> systemctl status backuppc
>
> If it shows as active/running, then the correct command to stop BackupPC
> is:
>
> systemctl stop backuppc
>
>
> Craig
>
> On Mon, Jun 29, 2020 at 11:05 AM Mark Maciolek  wrote:
>
>> hi,
>>
>> Running BackupPC v4.3.2 on Ubuntu 18.04 LTS. I want to upgrade to 4.4.0
>> but I can't get the backuppc process to stop. I can do
>> /etc/init.d/backuppc and it starts again. If I do kill -9  it
>> also just restarts.
>>
>> I have several other BackupPC servers and yet this is the only one that
>> does this.
>>
>> Does anyone have a clue to where I should start troubleshooting this
>> issue?
>>
>> Mark
>>
>>
>> ___
>> 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 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] backuppc process will not stop

2020-06-29 Thread Craig Barratt via BackupPC-users
Mark,

Perhaps systemd is being used to run BackupPC?

What output do you get from:

systemctl status backuppc

If it shows as active/running, then the correct command to stop BackupPC is:

systemctl stop backuppc


Craig

On Mon, Jun 29, 2020 at 11:05 AM Mark Maciolek  wrote:

> hi,
>
> Running BackupPC v4.3.2 on Ubuntu 18.04 LTS. I want to upgrade to 4.4.0
> but I can't get the backuppc process to stop. I can do
> /etc/init.d/backuppc and it starts again. If I do kill -9  it
> also just restarts.
>
> I have several other BackupPC servers and yet this is the only one that
> does this.
>
> Does anyone have a clue to where I should start troubleshooting this issue?
>
> Mark
>
>
> ___
> 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 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] backuppc process will not stop

2020-06-29 Thread Mark Maciolek
hi,

Running BackupPC v4.3.2 on Ubuntu 18.04 LTS. I want to upgrade to 4.4.0
but I can't get the backuppc process to stop. I can do
/etc/init.d/backuppc and it starts again. If I do kill -9  it
also just restarts.

I have several other BackupPC servers and yet this is the only one that
does this.

Does anyone have a clue to where I should start troubleshooting this issue?

Mark


___
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] Unable to connect on port -1

2020-06-29 Thread Phil Kennedy
I'll clarify a bit: the Backup.sock and LOCK file deletions were a long
shot that just happened to work. I noticed that those files were there with
the service stopped, and my suspicion / reasoning was that perhaps backuppc
was having trouble generating the socket because those represented a hung /
locked / otherwise old session. Deleting them worked a couple times (stop
service, delete, start service) but that seems to have stopped working as
well.

I will check NFS version, perhaps the NAS has started defaulting to v4, but
I can't be sure. In the past, mounting without nock on a synology NAS (I've
gone through a couple, issue happened on an old WD nas as well) would cause
a load average spike that would make Backuppc appear unstable, so my
default for many years has been nolock.
~Phil

On Sun, Jun 28, 2020, 6:45 PM Craig Barratt via BackupPC-users <
backuppc-users@lists.sourceforge.net> wrote:

> The CGI script is trying to connect to the BackupPC server using the
> unix-domain socket, which is at $Conf{LogDir}/BackupPC.sock. From your
> email, on your system that appears to be /var/lib/log/BackupPC.sock.
>
> Are you running nfs v3 or v4?  I have had experience with v3 not working
> reliably with BackupPC (related to buggy lock file behaviour).  BackupPC
> does rely on lock files working, so it's definitely not recommended to turn
> locking off.
>
> You said you deleted the BackupPC.sock file.  That would explain why the
> CGI script can't connect to the server.  Why did you delete it?  You said 
> "deleting
> those files doesn't always let the service restart" - deleting those files
> should not be used to get the server to restart.
>
> Craig
>
> On Sat, Jun 27, 2020 at 9:26 AM Phil Kennedy <
> phillip.kenn...@yankeeairmuseum.org> wrote:
>
>> I've hit my wits end on an issue with my backuppc instance. The system
>> ran fine, untouched, for many months. This is an ubuntu 16.0.4 system,
>> running backuppc 3.3.1, installed via apt. When accessing the index (or any
>> other pages), I get the following:
>> Error: Unable to connect to BackupPC server
>> This CGI script (/backuppc/index.cgi) is unable to connect to the
>> BackupPC server on pirate port -1.
>> The error was: unix connect: Connection refused.
>> Perhaps the BackupPC server is not running or there is a configuration
>> error. Please report this to your Sys Admin.
>>
>> The backuppc & apache services are running, and restarting without error.
>> The backuppc pool (and other important folders, such as log) lives on an
>> NFS mount, and /var/lib/backuppc is symlinked to /mnt/backup. Below is the
>> fstab entry that I use:
>>
>> 10.0.0.4:/backup /mnt/backup nfs users,auto,nolock,rw 0 0
>>
>> (I'm specifically using nolock, since that can cause a similar issue.
>> Mounting an NFS mount via some of the off the shelf NAS's out there can
>> have performance issues without nolock set.)
>>
>> I've been able to get the instance to start and run briefly by deleting
>> the BackupPC.sock and LOCK files from /var/lib/log, but the instance
>> doesn't stay running for very long (minutes to an hour or two), and the LOG
>> isn't giving me much data. On top of that, deleting those files doesn't
>> always let the service restart. Thoughts? This box lives a pretty stagnent
>> life, nothing tends to change configuration-wise.
>> ~Phil
>> ___
>> 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 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 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] Unable to connect on port -1

2020-06-29 Thread backuppc
G.W. Haywood via BackupPC-users wrote at about 14:16:15 +0100 on Monday, June 
29, 2020:
 > Hi there,
 > 
 > On Mon, 29 Jun 2020,  Craig Barratt wrote:
 > 
 > > ...
 > > Are you running nfs v3 or v4?  I have had experience with v3 not working
 > > reliably with BackupPC (related to buggy lock file behaviour).  BackupPC
 > > does rely on lock files working, so it's definitely not recommended to turn
 > > locking off.
 > > ...
 > 
 > I would go further than that.  My feeling is that NFS is not suitable
 > for something so important as your backups.
 > 

That being said I ran BackupPC successfully for almost a decade using
NFS-v3 to store the backups on a small under-powered/under-memory
ARM-based NAS. Never had a problem with lock files...


___
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] Unable to connect on port -1

2020-06-29 Thread Norman Goldstein
For what it is worth, I have been using an nfs mount to hold the pool 
files for both BPC V3 and V4.  This is the fstab entry:


192.168.1.80:/mnt/HD/HD_a2/POOLS /home/disks/nasPOOLS nfs nolock,rw,suid 0 0

The man page nfs(5) explains that nolock does not turn off locking 
completely.



On 2020-06-29 6:16 a.m., G.W. Haywood via BackupPC-users wrote:

Hi there,

On Mon, 29 Jun 2020,  Craig Barratt wrote:


...
Are you running nfs v3 or v4?  I have had experience with v3 not working
reliably with BackupPC (related to buggy lock file behaviour). BackupPC
does rely on lock files working, so it's definitely not recommended 
to turn

locking off.
...


I would go further than that.  My feeling is that NFS is not suitable
for something so important as your backups.






___
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] Unable to connect on port -1

2020-06-29 Thread G.W. Haywood via BackupPC-users

Hi there,

On Mon, 29 Jun 2020,  Craig Barratt wrote:


...
Are you running nfs v3 or v4?  I have had experience with v3 not working
reliably with BackupPC (related to buggy lock file behaviour).  BackupPC
does rely on lock files working, so it's definitely not recommended to turn
locking off.
...


I would go further than that.  My feeling is that NFS is not suitable
for something so important as your backups.

--

73,
Ged.


___
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/