notice backup script update!

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

notice backup script update!

Samba - General mailing list
Hai,
 
For the people using my modified backup script. 
Found here:
https://github.com/thctlo/samba4/tree/master/backup-script 
 
I've updated it, due to bug https://bugzilla.samba.org/show_bug.cgi?id=13088   netlogon_creds_cli.tdb will be excluded from the backup.
Due to this the script exits and does not backup anything since netlogon_creds_cli.tdb is the first it wanted to backup. ( in my case ).
 
Keep_days is working now also.
Tip here is, set you DAYS high, i've set a default of 60 days now and if KEEP_DAYS="yes" then all files older then 60 days will be removed from the backup, except dates with -01- -15-  .
 
Update you backup script or please do check if its running as it should.
I have not checked the original by samba source provided backup script, just beware and check it.
 
 
Greetz,
 
Louis
 
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba
Reply | Threaded
Open this post in threaded view
|

Re: notice backup script update!

Samba - General mailing list
New version again.
- Fix bug, backup stopt after private folder    

Greetz,

Louis


> -----Oorspronkelijk bericht-----
> Van: samba [mailto:[hidden email]] Namens
> L.P.H. van Belle via samba
> Verzonden: dinsdag 19 december 2017 10:55
> Aan: [hidden email]
> Onderwerp: [Samba] notice backup script update!
>
> Hai,
>  
> For the people using my modified backup script. 
> Found here:
> https://github.com/thctlo/samba4/tree/master/backup-script 
>  
> I've updated it, due to bug
> https://bugzilla.samba.org/show_bug.cgi?id=13088   
> netlogon_creds_cli.tdb will be excluded from the backup.
> Due to this the script exits and does not backup anything
> since netlogon_creds_cli.tdb is the first it wanted to
> backup. ( in my case ).
>  
> Keep_days is working now also.
> Tip here is, set you DAYS high, i've set a default of 60 days
> now and if KEEP_DAYS="yes" then all files older then 60 days
> will be removed from the backup, except dates with -01- -15-  .
>  
> Update you backup script or please do check if its running as
> it should.
> I have not checked the original by samba source provided
> backup script, just beware and check it.
>  
>  
> Greetz,
>  
> Louis
>  
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba
>
>


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba
Reply | Threaded
Open this post in threaded view
|

Re: notice backup script update!

Samba - General mailing list
In reply to this post by Samba - General mailing list
Hi Louis,

Thanks for maintaining that script! I took some time today to put it
into life at my site.

I hit on two issues:

The "#!/bin/bash -e" shebang line causes the script to exit at the first
error. Good for debugging, but in production it stops backing up the rest.

When used on a default-built samba version it fails on the config
directory: it correctly finds /usr/local/samba/etc but it should search
for "etc" from one level higher.
I fixed that by searching in ".." :
***************
*** 335,341 ****
           if [ "${CONFILE}" = "/etc/samba/smb.conf" ]; then
               relativedirname=$(${CMD_FIND} . -type d -name "$d" -prune)
           else
!             relativedirname=$(${CMD_FIND} . -type d -name "etc" -prune)
           fi
             # Run the backup.
             # --warning=no-file-ignored suppresses "socket ignored"
messages.
--- 335,341 ----
           if [ "${CONFILE}" = "/etc/samba/smb.conf" ]; then
               relativedirname=$(${CMD_FIND} . -type d -name "$d" -prune)
           else
!             relativedirname=$(${CMD_FIND} .. -type d -name "etc" -prune)
           fi
             # Run the backup.
             # --warning=no-file-ignored suppresses "socket ignored"
messages.
***************

I hope that helps.

Regards,
Norbert


On 19.12.2017 10:54, L.P.H. van Belle via samba wrote:

> Hai,
>  
> For the people using my modified backup script.
> Found here:
> https://github.com/thctlo/samba4/tree/master/backup-script
>  
> I've updated it, due to bug https://bugzilla.samba.org/show_bug.cgi?id=13088   netlogon_creds_cli.tdb will be excluded from the backup.
> Due to this the script exits and does not backup anything since netlogon_creds_cli.tdb is the first it wanted to backup. ( in my case ).
>  
> Keep_days is working now also.
> Tip here is, set you DAYS high, i've set a default of 60 days now and if KEEP_DAYS="yes" then all files older then 60 days will be removed from the backup, except dates with -01- -15-  .
>  
> Update you backup script or please do check if its running as it should.
> I have not checked the original by samba source provided backup script, just beware and check it.
>  
>  
> Greetz,
>  
> Louis
>  


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba
Reply | Threaded
Open this post in threaded view
|

Re: notice backup script update!

Samba - General mailing list
Hi Norbert,

I've updated git, thanks for the notice!
Most welkom.

> The "#!/bin/bash -e" shebang line causes the script to exit at the first
> error. Good for debugging, but in production it stops backing up the rest.
Yes, thats good, because then you know that you have a bug and where its in the code.

For others, the updated script can be found here :  
https://github.com/thctlo/samba4/tree/master/backup-script


Greetz,

Louis


> -----Oorspronkelijk bericht-----
> Van: samba [mailto:[hidden email]] Namens
> Norbert Hanke via samba
> Verzonden: dinsdag 2 januari 2018 16:58
> Aan: [hidden email]
> Onderwerp: Re: [Samba] notice backup script update!
>
> Hi Louis,
>
> Thanks for maintaining that script! I took some time today to put it
> into life at my site.
>
> I hit on two issues:
>
> The "#!/bin/bash -e" shebang line causes the script to exit
> at the first
> error. Good for debugging, but in production it stops backing
> up the rest.
>
> When used on a default-built samba version it fails on the config
> directory: it correctly finds /usr/local/samba/etc but it
> should search
> for "etc" from one level higher.
> I fixed that by searching in ".." :
> ***************
> *** 335,341 ****
>            if [ "${CONFILE}" = "/etc/samba/smb.conf" ]; then
>                relativedirname=$(${CMD_FIND} . -type d -name
> "$d" -prune)
>            else
> !             relativedirname=$(${CMD_FIND} . -type d -name
> "etc" -prune)
>            fi
>              # Run the backup.
>              # --warning=no-file-ignored suppresses "socket ignored"
> messages.
> --- 335,341 ----
>            if [ "${CONFILE}" = "/etc/samba/smb.conf" ]; then
>                relativedirname=$(${CMD_FIND} . -type d -name
> "$d" -prune)
>            else
> !             relativedirname=$(${CMD_FIND} .. -type d -name
> "etc" -prune)
>            fi
>              # Run the backup.
>              # --warning=no-file-ignored suppresses "socket ignored"
> messages.
> ***************
>
> I hope that helps.
>
> Regards,
> Norbert
>
>
> On 19.12.2017 10:54, L.P.H. van Belle via samba wrote:
> > Hai,
> >  
> > For the people using my modified backup script.
> > Found here:
> > https://github.com/thctlo/samba4/tree/master/backup-script
> >  
> > I've updated it, due to bug
> https://bugzilla.samba.org/show_bug.cgi?id=13088   
> netlogon_creds_cli.tdb will be excluded from the backup.
> > Due to this the script exits and does not backup anything
> since netlogon_creds_cli.tdb is the first it wanted to
> backup. ( in my case ).
> >  
> > Keep_days is working now also.
> > Tip here is, set you DAYS high, i've set a default of 60
> days now and if KEEP_DAYS="yes" then all files older then 60
> days will be removed from the backup, except dates with -01- -15-  .
> >  
> > Update you backup script or please do check if its running
> as it should.
> > I have not checked the original by samba source provided
> backup script, just beware and check it.
> >  
> >  
> > Greetz,
> >  
> > Louis
> >  
>
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba
>
>


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba