backup using the packages of Sernet

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

backup using the packages of Sernet

Gabriel O. Franca
dear,

I made the installation of Samba4 in centos6, now I need to back up the structure, tried using the script that samba.org offers more he is giving this error.

See the error through the bash -x
bash -x samba_backup.sh
+ FROMWHERE = / var / lib / samba
+ WHERE = / root / backups
+ '[' N '' ']'
+ '[' -n '' -a -d '' ']'
+ '[' -n '' -a -d '' ']'
SRD + = 'private etc sysvol'
+ = 90 DAYS
++ Date +% d% m% y
WHEN = + 050 115
+ '[' '!' -d / root / backups ']'
+ '[' '!' -d / var / lib / samba ']'
+ Cd / var / lib / samba
D + is in '$ SRD'
++ Find. -type d -name private -prune
Relativedirname + =. / Private
++ Echo private
++ Sed 's / \ // _ / g'
+ N = private
+ '[' Private = private ']'
+ ./private Find -name '* .ldb.bak' -exec rm '{}' ';'
++ ./private Find -name '* .ldb'
+ For ldb in '`find $ relativedirname -name" * .ldb "`'
+ Tdbbackup ./private/idmap.ldb
+ '[' -ne 0 0 ']'
+ For ldb in '`find $ relativedirname -name" * .ldb "`'
+ Tdbbackup ./private/hklm.ldb
+ '[' -ne 0 0 ']'
+ For ldb in '`find $ relativedirname -name" * .ldb "`'
+ Tdbbackup ./private/sam.ldb
+ '[' -ne 0 0 ']'
+ For ldb in '`find $ relativedirname -name" * .ldb "`'
+ Tdbbackup ./private/share.ldb
+ '[' -ne 0 0 ']'
+ For ldb in '`find $ relativedirname -name" * .ldb "`'
+ Tdbbackup ./private/sam.ldb.d/DC=DOMAINDNSZONES,DC=SCHIPPER,DC=LOCAL.ldb
+ '[' -ne 0 0 ']'
+ For ldb in '`find $ relativedirname -name" * .ldb "`'
+ Tdbbackup ./private/sam.ldb.d/DC=SCHIPPER,DC=LOCAL.ldb
+ '[' -ne 0 0 ']'
+ For ldb in '`find $ relativedirname -name" * .ldb "`'
+ Tdbbackup ./private/sam.ldb.d/DC=FORESTDNSZONES,DC=SCHIPPER,DC=LOCAL.ldb
+ '[' -ne 0 0 ']'
+ For ldb in '`find $ relativedirname -name" * .ldb "`'
+ Tdbbackup ./private/sam.ldb.d/CN=SCHEMA,CN=CONFIGURATION,DC=SCHIPPER,DC=LOCAL.ldb
+ '[' -ne 0 0 ']'
+ For ldb in '`find $ relativedirname -name" * .ldb "`'
+ Tdbbackup ./private/sam.ldb.d/CN=CONFIGURATION,DC=SCHIPPER,DC=LOCAL.ldb
+ '[' -ne 0 0 ']'
+ For ldb in '`find $ relativedirname -name" * .ldb "`'
+ Tdbbackup ./private/privilege.ldb
+ '[' -ne 0 0 ']'
+ For ldb in '`find $ relativedirname -name" * .ldb "`'
+ Tdbbackup ./private/secrets.ldb
+ '[' -ne 0 0 ']'
+ Tar CJF /root/backups/samba4_private.050115.tar.bz2 ./private '--exclude = *. Ldb'
+ '[' -ne 0 0 ']'
+ ./private Find -name '* .ldb.bak' -exec rm '{}' ';'
D + is in '$ SRD'
++ Find. -type d -name etc -prune
+ Relativedirname =
++ Echo etc.
++ Sed 's / \ // _ / g'
+ N = etc.
+ '[' Etc. = private ']'
+ Tar CJF /root/backups/etc.050115.tar.bz2
+ '[' 2 -ne 0 ']'
+ Echo 'Error while archiving /root/backups/etc.050115.tar.bz2'
Error while archiving /root/backups/etc.050115.tar.bz2
+ Exit 1

Gabriel Franca
--
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
|  
Report Content as Inappropriate

Re: backup using the packages of Sernet

Rowland Penny-5
On 05/01/15 12:04, Gabriel Franca wrote:

> dear,
>
> I made the installation of Samba4 in centos6, now I need to back up the structure, tried using the script that samba.org offers more he is giving this error.
>
> See the error through the bash -x
> bash -x samba_backup.sh
> + FROMWHERE = / var / lib / samba
> + WHERE = / root / backups
> + '[' N '' ']'
> + '[' -n '' -a -d '' ']'
> + '[' -n '' -a -d '' ']'
> SRD + = 'private etc sysvol'
> + = 90 DAYS
> ++ Date +% d% m% y
> WHEN = + 050 115
> + '[' '!' -d / root / backups ']'
> + '[' '!' -d / var / lib / samba ']'
> + Cd / var / lib / samba
> D + is in '$ SRD'
> ++ Find. -type d -name private -prune
> Relativedirname + =. / Private
> ++ Echo private
> ++ Sed 's / \ // _ / g'
> + N = private
> + '[' Private = private ']'
> + ./private Find -name '* .ldb.bak' -exec rm '{}' ';'
> ++ ./private Find -name '* .ldb'
> + For ldb in '`find $ relativedirname -name" * .ldb "`'
> + Tdbbackup ./private/idmap.ldb
> + '[' -ne 0 0 ']'
> + For ldb in '`find $ relativedirname -name" * .ldb "`'
> + Tdbbackup ./private/hklm.ldb
> + '[' -ne 0 0 ']'
> + For ldb in '`find $ relativedirname -name" * .ldb "`'
> + Tdbbackup ./private/sam.ldb
> + '[' -ne 0 0 ']'
> + For ldb in '`find $ relativedirname -name" * .ldb "`'
> + Tdbbackup ./private/share.ldb
> + '[' -ne 0 0 ']'
> + For ldb in '`find $ relativedirname -name" * .ldb "`'
> + Tdbbackup ./private/sam.ldb.d/DC=DOMAINDNSZONES,DC=SCHIPPER,DC=LOCAL.ldb
> + '[' -ne 0 0 ']'
> + For ldb in '`find $ relativedirname -name" * .ldb "`'
> + Tdbbackup ./private/sam.ldb.d/DC=SCHIPPER,DC=LOCAL.ldb
> + '[' -ne 0 0 ']'
> + For ldb in '`find $ relativedirname -name" * .ldb "`'
> + Tdbbackup ./private/sam.ldb.d/DC=FORESTDNSZONES,DC=SCHIPPER,DC=LOCAL.ldb
> + '[' -ne 0 0 ']'
> + For ldb in '`find $ relativedirname -name" * .ldb "`'
> + Tdbbackup ./private/sam.ldb.d/CN=SCHEMA,CN=CONFIGURATION,DC=SCHIPPER,DC=LOCAL.ldb
> + '[' -ne 0 0 ']'
> + For ldb in '`find $ relativedirname -name" * .ldb "`'
> + Tdbbackup ./private/sam.ldb.d/CN=CONFIGURATION,DC=SCHIPPER,DC=LOCAL.ldb
> + '[' -ne 0 0 ']'
> + For ldb in '`find $ relativedirname -name" * .ldb "`'
> + Tdbbackup ./private/privilege.ldb
> + '[' -ne 0 0 ']'
> + For ldb in '`find $ relativedirname -name" * .ldb "`'
> + Tdbbackup ./private/secrets.ldb
> + '[' -ne 0 0 ']'
> + Tar CJF /root/backups/samba4_private.050115.tar.bz2 ./private '--exclude = *. Ldb'
> + '[' -ne 0 0 ']'
> + ./private Find -name '* .ldb.bak' -exec rm '{}' ';'
> D + is in '$ SRD'
> ++ Find. -type d -name etc -prune
> + Relativedirname =
> ++ Echo etc.
> ++ Sed 's / \ // _ / g'
> + N = etc.
> + '[' Etc. = private ']'
> + Tar CJF /root/backups/etc.050115.tar.bz2
> + '[' 2 -ne 0 ']'
> + Echo 'Error while archiving /root/backups/etc.050115.tar.bz2'
> Error while archiving /root/backups/etc.050115.tar.bz2
> + Exit 1
>
> Gabriel Franca

Hi, do you want to try my backup script, it is based on the script that
you have tried, but has been re-written to be used with the Debian samba
packages, so I believe it should also work with the sernet packages.

Rowland

--
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
|  
Report Content as Inappropriate

Re: backup using the packages of Sernet

Gabriel O. Franca
Hi Rowland,

I test yes !!!

could make the script?

kind regards,

Gabriel Franca



> Em 05/01/2015, à(s) 11:07, Rowland Penny <[hidden email]> escreveu:
>
> On 05/01/15 12:04, Gabriel Franca wrote:
>> dear,
>>
>> I made the installation of Samba4 in centos6, now I need to back up the structure, tried using the script that samba.org offers more he is giving this error.
>>
>> See the error through the bash -x
>> bash -x samba_backup.sh
>> + FROMWHERE = / var / lib / samba
>> + WHERE = / root / backups
>> + '[' N '' ']'
>> + '[' -n '' -a -d '' ']'
>> + '[' -n '' -a -d '' ']'
>> SRD + = 'private etc sysvol'
>> + = 90 DAYS
>> ++ Date +% d% m% y
>> WHEN = + 050 115
>> + '[' '!' -d / root / backups ']'
>> + '[' '!' -d / var / lib / samba ']'
>> + Cd / var / lib / samba
>> D + is in '$ SRD'
>> ++ Find. -type d -name private -prune
>> Relativedirname + =. / Private
>> ++ Echo private
>> ++ Sed 's / \ // _ / g'
>> + N = private
>> + '[' Private = private ']'
>> + ./private Find -name '* .ldb.bak' -exec rm '{}' ';'
>> ++ ./private Find -name '* .ldb'
>> + For ldb in '`find $ relativedirname -name" * .ldb "`'
>> + Tdbbackup ./private/idmap.ldb
>> + '[' -ne 0 0 ']'
>> + For ldb in '`find $ relativedirname -name" * .ldb "`'
>> + Tdbbackup ./private/hklm.ldb
>> + '[' -ne 0 0 ']'
>> + For ldb in '`find $ relativedirname -name" * .ldb "`'
>> + Tdbbackup ./private/sam.ldb
>> + '[' -ne 0 0 ']'
>> + For ldb in '`find $ relativedirname -name" * .ldb "`'
>> + Tdbbackup ./private/share.ldb
>> + '[' -ne 0 0 ']'
>> + For ldb in '`find $ relativedirname -name" * .ldb "`'
>> + Tdbbackup ./private/sam.ldb.d/DC=DOMAINDNSZONES,DC=SCHIPPER,DC=LOCAL.ldb
>> + '[' -ne 0 0 ']'
>> + For ldb in '`find $ relativedirname -name" * .ldb "`'
>> + Tdbbackup ./private/sam.ldb.d/DC=SCHIPPER,DC=LOCAL.ldb
>> + '[' -ne 0 0 ']'
>> + For ldb in '`find $ relativedirname -name" * .ldb "`'
>> + Tdbbackup ./private/sam.ldb.d/DC=FORESTDNSZONES,DC=SCHIPPER,DC=LOCAL.ldb
>> + '[' -ne 0 0 ']'
>> + For ldb in '`find $ relativedirname -name" * .ldb "`'
>> + Tdbbackup ./private/sam.ldb.d/CN=SCHEMA,CN=CONFIGURATION,DC=SCHIPPER,DC=LOCAL.ldb
>> + '[' -ne 0 0 ']'
>> + For ldb in '`find $ relativedirname -name" * .ldb "`'
>> + Tdbbackup ./private/sam.ldb.d/CN=CONFIGURATION,DC=SCHIPPER,DC=LOCAL.ldb
>> + '[' -ne 0 0 ']'
>> + For ldb in '`find $ relativedirname -name" * .ldb "`'
>> + Tdbbackup ./private/privilege.ldb
>> + '[' -ne 0 0 ']'
>> + For ldb in '`find $ relativedirname -name" * .ldb "`'
>> + Tdbbackup ./private/secrets.ldb
>> + '[' -ne 0 0 ']'
>> + Tar CJF /root/backups/samba4_private.050115.tar.bz2 ./private '--exclude = *. Ldb'
>> + '[' -ne 0 0 ']'
>> + ./private Find -name '* .ldb.bak' -exec rm '{}' ';'
>> D + is in '$ SRD'
>> ++ Find. -type d -name etc -prune
>> + Relativedirname =
>> ++ Echo etc.
>> ++ Sed 's / \ // _ / g'
>> + N = etc.
>> + '[' Etc. = private ']'
>> + Tar CJF /root/backups/etc.050115.tar.bz2
>> + '[' 2 -ne 0 ']'
>> + Echo 'Error while archiving /root/backups/etc.050115.tar.bz2'
>> Error while archiving /root/backups/etc.050115.tar.bz2
>> + Exit 1
>>
>> Gabriel Franca
>
> Hi, do you want to try my backup script, it is based on the script that you have tried, but has been re-written to be used with the Debian samba packages, so I believe it should also work with the sernet packages.
>
> Rowland
>
> --
> 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
|  
Report Content as Inappropriate

Re: backup using the packages of Sernet

Samba - General mailing list
Hi Gabriel,

did Roland's script work for the sernet packages? I also use them and want to setup a backup of my DCs. If your script works, could you also provide it to me?

Best regards,
Stephan Mattecka


> Gesendet: Montag, 05. Januar 2015 um 15:24 Uhr
> Von: "Gabriel Franca" <[hidden email]>
> An: "Rowland Penny" <[hidden email]>
> Cc: [hidden email]
> Betreff: Re: [Samba] backup using the packages of Sernet
>
> Hi Rowland,
>
> I test yes !!!
>
> could make the script?
>
> kind regards,
>
> Gabriel Franca
>
>
>
> > Em 05/01/2015, à(s) 11:07, Rowland Penny <[hidden email]> escreveu:
> >
> > On 05/01/15 12:04, Gabriel Franca wrote:
> >> dear,
> >>
> >> I made the installation of Samba4 in centos6, now I need to back up the structure, tried using the script that samba.org offers more he is giving this error.
> >>
> >> See the error through the bash -x
> >> bash -x samba_backup.sh
> >> + FROMWHERE = / var / lib / samba
> >> + WHERE = / root / backups
> >> + '[' N '' ']'
> >> + '[' -n '' -a -d '' ']'
> >> + '[' -n '' -a -d '' ']'
> >> SRD + = 'private etc sysvol'
> >> + = 90 DAYS
> >> ++ Date +% d% m% y
> >> WHEN = + 050 115
> >> + '[' '!' -d / root / backups ']'
> >> + '[' '!' -d / var / lib / samba ']'
> >> + Cd / var / lib / samba
> >> D + is in '$ SRD'
> >> ++ Find. -type d -name private -prune
> >> Relativedirname + =. / Private
> >> ++ Echo private
> >> ++ Sed 's / \ // _ / g'
> >> + N = private
> >> + '[' Private = private ']'
> >> + ./private Find -name '* .ldb.bak' -exec rm '{}' ';'
> >> ++ ./private Find -name '* .ldb'
> >> + For ldb in '`find $ relativedirname -name" * .ldb "`'
> >> + Tdbbackup ./private/idmap.ldb
> >> + '[' -ne 0 0 ']'
> >> + For ldb in '`find $ relativedirname -name" * .ldb "`'
> >> + Tdbbackup ./private/hklm.ldb
> >> + '[' -ne 0 0 ']'
> >> + For ldb in '`find $ relativedirname -name" * .ldb "`'
> >> + Tdbbackup ./private/sam.ldb
> >> + '[' -ne 0 0 ']'
> >> + For ldb in '`find $ relativedirname -name" * .ldb "`'
> >> + Tdbbackup ./private/share.ldb
> >> + '[' -ne 0 0 ']'
> >> + For ldb in '`find $ relativedirname -name" * .ldb "`'
> >> + Tdbbackup ./private/sam.ldb.d/DC=DOMAINDNSZONES,DC=SCHIPPER,DC=LOCAL.ldb
> >> + '[' -ne 0 0 ']'
> >> + For ldb in '`find $ relativedirname -name" * .ldb "`'
> >> + Tdbbackup ./private/sam.ldb.d/DC=SCHIPPER,DC=LOCAL.ldb
> >> + '[' -ne 0 0 ']'
> >> + For ldb in '`find $ relativedirname -name" * .ldb "`'
> >> + Tdbbackup ./private/sam.ldb.d/DC=FORESTDNSZONES,DC=SCHIPPER,DC=LOCAL.ldb
> >> + '[' -ne 0 0 ']'
> >> + For ldb in '`find $ relativedirname -name" * .ldb "`'
> >> + Tdbbackup ./private/sam.ldb.d/CN=SCHEMA,CN=CONFIGURATION,DC=SCHIPPER,DC=LOCAL.ldb
> >> + '[' -ne 0 0 ']'
> >> + For ldb in '`find $ relativedirname -name" * .ldb "`'
> >> + Tdbbackup ./private/sam.ldb.d/CN=CONFIGURATION,DC=SCHIPPER,DC=LOCAL.ldb
> >> + '[' -ne 0 0 ']'
> >> + For ldb in '`find $ relativedirname -name" * .ldb "`'
> >> + Tdbbackup ./private/privilege.ldb
> >> + '[' -ne 0 0 ']'
> >> + For ldb in '`find $ relativedirname -name" * .ldb "`'
> >> + Tdbbackup ./private/secrets.ldb
> >> + '[' -ne 0 0 ']'
> >> + Tar CJF /root/backups/samba4_private.050115.tar.bz2 ./private '--exclude = *. Ldb'
> >> + '[' -ne 0 0 ']'
> >> + ./private Find -name '* .ldb.bak' -exec rm '{}' ';'
> >> D + is in '$ SRD'
> >> ++ Find. -type d -name etc -prune
> >> + Relativedirname =
> >> ++ Echo etc.
> >> ++ Sed 's / \ // _ / g'
> >> + N = etc.
> >> + '[' Etc. = private ']'
> >> + Tar CJF /root/backups/etc.050115.tar.bz2
> >> + '[' 2 -ne 0 ']'
> >> + Echo 'Error while archiving /root/backups/etc.050115.tar.bz2'
> >> Error while archiving /root/backups/etc.050115.tar.bz2
> >> + Exit 1
> >>
> >> Gabriel Franca
> >
> > Hi, do you want to try my backup script, it is based on the script that you have tried, but has been re-written to be used with the Debian samba packages, so I believe it should also work with the sernet packages.
> >
> > Rowland
> >
> > --
> > 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

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