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
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 FrancaHi, 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
Hi Rowland, I test yes !!! could make the script? kind regards, Gabriel Franca> Em 05/01/2015, ?(s) 11:07, Rowland Penny <rowlandpenny at googlemail.com> 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