Re: [BackupPC-users] systemd init for version 4?

2017-03-18 Thread Craig Barratt
Yes, I've tested it.  BackupPC always creates a PID file even in non-daemon
mode (BackupPC checks it to see if another copy is running already).

I only started using systemd a week ago :), so I appreciate the
suggestions.  I agree the PIDFile isn't needed, but it does remove it if
BackupPC isn't running, which is a small bit of useful housekeeping.

I am hoping to get 4.1.0 out soon.  I decided to make the next version
4.1.0 instead of 4.0.1 since there are a couple of new features
(BackupPC_migrateV3toV4, new CSS from Ernesto, systemd config, changes to
configure.pl) and one relatively significant bug fix (exponential expiry of
backups from Alexander), in addition to several more minor bug fixes
(fixing umask, nmblookup hosts in rsync, more robust checking that
IO::Dirent works, better handing of empty reference counts per backup by
BackupPC_refCntUpdate, fixing exit status in UserCommandRun(), BackupPC
exit 0 following SIGTERM, etc).

There are two open issues (#64
 and #65
) that I haven't been able
to replicate that ideally I'd like to root cause before releasing.  I have
open suggestions to each reporter to help debug.  Does anyone else have
open 4.x issues (other than local config etc)?

Craig

On Sat, Mar 18, 2017 at 9:47 AM, Richard Shaw  wrote:

> On Sat, Mar 18, 2017 at 10:43 AM, Craig Barratt <
> cbarr...@users.sourceforge.net> wrote:
>
>> I just pushed to git (https://github.com/backuppc/b
>> ackuppc/commit/51e579bae854ec78573cff9c3ff36ee589286502) these changes:
>>
>>- BackupPC exits with status 0 on TERM signal
>>- systemd file now uses Type=simple, dropped the -d, and TERM signal
>>to terminate
>>
>> Have you tested it? I noticed you didn't drop the PIDFile... Does
> BackupPC create one whether -d is specified or not?
>
> A patch against 4.0.0 would be great unless there's a forthcoming 4.0.1
> release?
>
> 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/
>
>
--
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] systemd init for version 4?

2017-03-18 Thread Richard Shaw
On Sat, Mar 18, 2017 at 10:43 AM, Craig Barratt <
cbarr...@users.sourceforge.net> wrote:

> I just pushed to git (https://github.com/backuppc/backuppc/commit/
> 51e579bae854ec78573cff9c3ff36ee589286502) these changes:
>
>- BackupPC exits with status 0 on TERM signal
>- systemd file now uses Type=simple, dropped the -d, and TERM signal
>to terminate
>
> Have you tested it? I noticed you didn't drop the PIDFile... Does BackupPC
create one whether -d is specified or not?

A patch against 4.0.0 would be great unless there's a forthcoming 4.0.1
release?

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] systemd init for version 4?

2017-03-18 Thread Craig Barratt
I just pushed to git (
https://github.com/backuppc/backuppc/commit/51e579bae854ec78573cff9c3ff36ee589286502)
these changes:

   - BackupPC exits with status 0 on TERM signal
   - systemd file now uses Type=simple, dropped the -d, and TERM signal to
   terminate

Craig

On Sat, Mar 18, 2017 at 6:47 AM, Richard Shaw  wrote:

> On Tue, Mar 14, 2017 at 7:07 PM, Craig Barratt <
> cbarr...@users.sourceforge.net> wrote:
>
>> Richard,
>>
>> Both INT and TERM are handled the same way, so they should be equivalent.
>>
>
> Ok, back from a work trip so I can look at this again...
>
> I should have mentioned I'm experimenting with my CentOS 7 w/ BackupPC 3.X
> box but I'm not sure if it matters in this case.
>
> In the systemd service file on github you have ExecStop set to send a
> SIGHUP but that's used to reload config.pl and hosts, correct?
>
> It seems no matter what signal I use I never get a clean exit 0 but a 1
> which systemd interprets as a failure...
>
> Also, with Systemd there's no requirement to fork so unless BackupPC needs
> to fork for some reason then we could drop the '-d' and just use
> Type=simple.
>
> 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/
>
>
--
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] systemd init for version 4?

2017-03-18 Thread Richard Shaw
On Tue, Mar 14, 2017 at 7:07 PM, Craig Barratt <
cbarr...@users.sourceforge.net> wrote:

> Richard,
>
> Both INT and TERM are handled the same way, so they should be equivalent.
>

Ok, back from a work trip so I can look at this again...

I should have mentioned I'm experimenting with my CentOS 7 w/ BackupPC 3.X
box but I'm not sure if it matters in this case.

In the systemd service file on github you have ExecStop set to send a
SIGHUP but that's used to reload config.pl and hosts, correct?

It seems no matter what signal I use I never get a clean exit 0 but a 1
which systemd interprets as a failure...

Also, with Systemd there's no requirement to fork so unless BackupPC needs
to fork for some reason then we could drop the '-d' and just use
Type=simple.

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] systemd init for version 4?

2017-03-14 Thread Moorcroft, Mark (ARC-TS)[Analytical Mechanics Associates, INC.]


No worries, I appreciate the efforts.





The new version has two new dependencies, BackupPC-XS (a perl module) and

rsync-bpc (a fork of rsync with the required modifications)



The review requests can be found here:

https://bugzilla.redhat.com/show_bug.cgi?id=1432122

https://bugzilla.redhat.com/show_bug.cgi?id=1432104



I have build local packages of these and BackupPC 4 but haven't gotten them

working just yet. $DAYJOB has to come first :)



Thanks,

Richard





--



Contractor: AMA Incorporated

Mark Moorcroft – Lead Admin

ESTRAD Linux Computer Support


--
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] systemd init for version 4?

2017-03-14 Thread Craig Barratt
Richard,

Both INT and TERM are handled the same way, so they should be equivalent.

Craig


On Tue, Mar 14, 2017 at 12:58 PM, Richard Shaw  wrote:

> Craig,
>
> I noticed you set ExecStop to use SIGHUP to stop BackupPC but it looks
> like the sysv script uses SIGTERM...
>
> What is the correct way to tell BackupPC to stop?
>
> There is the options KillMode and KillSignal to tell systemd how to stop
> the process.
>
> 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/
>
>
--
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] systemd init for version 4?

2017-03-14 Thread Richard Shaw
On Tue, Mar 14, 2017 at 3:46 PM, Moorcroft, Mark (ARC-TS)[Analytical
Mechanics Associates, INC.]  wrote:

> Do you have any target date in mind to have the epel package ready to
> update from 3.x to 4.x? So I can tell my boss.
>

The new version has two new dependencies, BackupPC-XS (a perl module) and
rsync-bpc (a fork of rsync with the required modifications)

The review requests can be found here:
https://bugzilla.redhat.com/show_bug.cgi?id=1432122
https://bugzilla.redhat.com/show_bug.cgi?id=1432104

I have build local packages of these and BackupPC 4 but haven't gotten them
working just yet. $DAYJOB has to come first :)

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] systemd init for version 4?

2017-03-14 Thread Moorcroft, Mark (ARC-TS)[Analytical Mechanics Associates, INC.]




Do you have any target date in mind to have the epel package ready to update 
from 3.x to 4.x? So I can tell my boss.







The current Fedora / EPEL package supplies a SystemD unit file but it uses

type=oneshot which I don't agree with (although it works). I'm currently

working on taking over maintenance of the package since the current

maintainer doesn't really use it anymore. I plan on changing the service

file to:





--



Contractor: AMA Incorporated

Mark Moorcroft – Lead Admin

ESTRAD Linux Computer Support


--
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] systemd init for version 4?

2017-03-14 Thread Richard Shaw
Craig,

I noticed you set ExecStop to use SIGHUP to stop BackupPC but it looks like
the sysv script uses SIGTERM...

What is the correct way to tell BackupPC to stop?

There is the options KillMode and KillSignal to tell systemd how to stop
the process.

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] systemd init for version 4?

2017-03-12 Thread Craig Barratt
In Github master, I renamed the init.d directory to systemd, added a
template backuppc.service, and updated the README file. See
https://github.com/backuppc/backuppc/tree/master/systemd. The template
service file is in
https://github.com/backuppc/backuppc/blob/master/systemd/src/backuppc.service
.

When you run configure.pl it updates the settings in
systemd/src/backuppc.service and deposits the output in
systemd/backuppc.service.  It still updates the old init.d files (now in
systemd/src), but they are now put in a subdirectory (systemd/init,d).

Craig

On Fri, Mar 10, 2017 at 2:17 PM, Craig Barratt <
cbarr...@users.sourceforge.net> wrote:

> I'd love to include robust systemd templates and clearly written docs in
> the vanilla BackupPC release (and on the Wiki).  Previously, the package
> managers had to include their own favorite flavors since the upstream
> release doesn't include any.  That presents problems, such as having many
> different flavors in the field, and make it more difficult to upgrade a
> package install with the vanilla upstream release.
>
> If one or more folks could volunteer to pull that together, I'll include
> it in the next release.  There's also a git issue #57 on this topic:
> https://github.com/backuppc/backuppc/issues/57.  It would be good to
> factor in that input too.
>
> Craig
>
> On Fri, Mar 10, 2017 at 1:48 PM, Moorcroft, Mark (ARC-TS)[Analytical
> Mechanics Associates, INC.]  wrote:
>
>>
>>
>> Awesome news. I have been waiting for this day for 10+ years.
>>
>>
>>
>> Thanks
>>
>>
>>
>>
>>
>> The current Fedora / EPEL package supplies a SystemD unit file but it uses
>>
>> type=oneshot which I don't agree with (although it works). I'm currently
>>
>> working on taking over maintenance of the package since the current
>>
>> maintainer doesn't really use it anymore. I plan on changing the service
>>
>> file to:
>>
>>
>>
>> # systemctl cat backuppc.service
>>
>> # /etc/systemd/system/backuppc.service
>>
>> [Unit]
>>
>> Description= BackupPC server
>>
>> After=syslog.target local-fs.target remote-fs.target
>>
>>
>>
>> [Service]
>>
>> Type=forking
>>
>> User=backuppc
>>
>> Group=backuppc
>>
>> ExecStart=/usr/share/BackupPC/bin/BackupPC -d
>>
>> PIDFile=/var/run/BackupPC/BackupPC.pid
>>
>>
>>
>> [Install]
>>
>> WantedBy=multi-user.target
>>
>>
>>
>> Keep in mind that the package patches the location of the pid file as 3.X
>>
>> put it in the log directory ($logDir or something like that).
>>
>>
>>
>> Thanks,
>>
>> Richard
>>
>>
>>
>> --
>>
>> Contractor: AMA Incorporated
>>
>> Mark Moorcroft – Lead Admin
>>
>> ESTRAD Linux Computer Support
>>
>> Trouble Tickets - tssupp...@dactyl.arc.nasa.gov
>>
>> NASA Ames Research Center
>>
>> Moffett Field, CA 94035-1000
>>
>> N230/108 (MS N230-1)
>>
>> Desk Phone # +1-650-604-4784 <(650)%20604-4784>
>>
>> 
>> --
>> Announcing the Oxford Dictionaries API! The API offers world-renowned
>> dictionary content that is easy and intuitive to access. Sign up for an
>> account today to start using our lexical data to power your apps and
>> projects. Get started today and enter our developer competition.
>> http://sdm.link/oxford
>> ___
>> 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/
>>
>>
>
--
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford___
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] systemd init for version 4?

2017-03-10 Thread Craig Barratt
I'd love to include robust systemd templates and clearly written docs in
the vanilla BackupPC release (and on the Wiki).  Previously, the package
managers had to include their own favorite flavors since the upstream
release doesn't include any.  That presents problems, such as having many
different flavors in the field, and make it more difficult to upgrade a
package install with the vanilla upstream release.

If one or more folks could volunteer to pull that together, I'll include it
in the next release.  There's also a git issue #57 on this topic:
https://github.com/backuppc/backuppc/issues/57.  It would be good to factor
in that input too.

Craig

On Fri, Mar 10, 2017 at 1:48 PM, Moorcroft, Mark (ARC-TS)[Analytical
Mechanics Associates, INC.]  wrote:

>
>
> Awesome news. I have been waiting for this day for 10+ years.
>
>
>
> Thanks
>
>
>
>
>
> The current Fedora / EPEL package supplies a SystemD unit file but it uses
>
> type=oneshot which I don't agree with (although it works). I'm currently
>
> working on taking over maintenance of the package since the current
>
> maintainer doesn't really use it anymore. I plan on changing the service
>
> file to:
>
>
>
> # systemctl cat backuppc.service
>
> # /etc/systemd/system/backuppc.service
>
> [Unit]
>
> Description= BackupPC server
>
> After=syslog.target local-fs.target remote-fs.target
>
>
>
> [Service]
>
> Type=forking
>
> User=backuppc
>
> Group=backuppc
>
> ExecStart=/usr/share/BackupPC/bin/BackupPC -d
>
> PIDFile=/var/run/BackupPC/BackupPC.pid
>
>
>
> [Install]
>
> WantedBy=multi-user.target
>
>
>
> Keep in mind that the package patches the location of the pid file as 3.X
>
> put it in the log directory ($logDir or something like that).
>
>
>
> Thanks,
>
> Richard
>
>
>
> --
>
> Contractor: AMA Incorporated
>
> Mark Moorcroft – Lead Admin
>
> ESTRAD Linux Computer Support
>
> Trouble Tickets - tssupp...@dactyl.arc.nasa.gov
>
> NASA Ames Research Center
>
> Moffett Field, CA 94035-1000
>
> N230/108 (MS N230-1)
>
> Desk Phone # +1-650-604-4784 <(650)%20604-4784>
>
> 
> --
> Announcing the Oxford Dictionaries API! The API offers world-renowned
> dictionary content that is easy and intuitive to access. Sign up for an
> account today to start using our lexical data to power your apps and
> projects. Get started today and enter our developer competition.
> http://sdm.link/oxford
> ___
> 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/
>
>
--
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford___
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] systemd init for version 4?

2017-03-10 Thread Moorcroft, Mark (ARC-TS)[Analytical Mechanics Associates, INC.]


Awesome news. I have been waiting for this day for 10+ years.



Thanks





The current Fedora / EPEL package supplies a SystemD unit file but it uses

type=oneshot which I don't agree with (although it works). I'm currently

working on taking over maintenance of the package since the current

maintainer doesn't really use it anymore. I plan on changing the service

file to:



# systemctl cat backuppc.service

# /etc/systemd/system/backuppc.service

[Unit]

Description= BackupPC server

After=syslog.target local-fs.target remote-fs.target



[Service]

Type=forking

User=backuppc

Group=backuppc

ExecStart=/usr/share/BackupPC/bin/BackupPC -d

PIDFile=/var/run/BackupPC/BackupPC.pid



[Install]

WantedBy=multi-user.target



Keep in mind that the package patches the location of the pid file as 3.X

put it in the log directory ($logDir or something like that).



Thanks,

Richard



--

Contractor: AMA Incorporated

Mark Moorcroft – Lead Admin

ESTRAD Linux Computer Support

Trouble Tickets - tssupp...@dactyl.arc.nasa.gov

NASA Ames Research Center

Moffett Field, CA 94035-1000

N230/108 (MS N230-1)

Desk Phone # +1-650-604-4784
--
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford___
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] systemd init for version 4?

2017-03-10 Thread Richard Shaw
On Fri, Mar 10, 2017 at 12:27 PM, Moorcroft, Mark (ARC-TS)[Analytical
Mechanics Associates, INC.]  wrote:

>
>
> I’m curious since el7 has been the current OS for a pretty long time why
> the “new” version of BackupPC defaults to init.d? I will probably wait for
> the epel package to appear before I upgrade. But I gave consideration to
> piecing together a 4.x install to replace 3.x, but locate things so when
> the package arrives I can migrate to yum managed updates. Is there a
> backuppc.service file in the git repo, or is it left to the user to come up
> with that?
>

The current Fedora / EPEL package supplies a SystemD unit file but it uses
type=oneshot which I don't agree with (although it works). I'm currently
working on taking over maintenance of the package since the current
maintainer doesn't really use it anymore. I plan on changing the service
file to:

# systemctl cat backuppc.service
# /etc/systemd/system/backuppc.service
[Unit]
Description= BackupPC server
After=syslog.target local-fs.target remote-fs.target

[Service]
Type=forking
User=backuppc
Group=backuppc
ExecStart=/usr/share/BackupPC/bin/BackupPC -d
PIDFile=/var/run/BackupPC/BackupPC.pid

[Install]
WantedBy=multi-user.target

Keep in mind that the package patches the location of the pid file as 3.X
put it in the log directory ($logDir or something like that).

Thanks,
Richard
--
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford___
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/