search for: relativedirname

Displaying 13 results from an estimated 13 matches for "relativedirname".

2015 Jan 05
2
backup using the packages of Sernet
...]' 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" * .ld...
2015 Jan 05
0
backup using the packages of Sernet
...gt; + = 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...
2013 Apr 22
0
samba4 backup script
...l" #Number of days to keep the backup DAYS=90 WHEN=$(date +%d%m%y) if [ ! -d $WHERE ]; then echo "Missing backup directory $WHERE" exit 1 fi if [ ! -d $FROMWHERE ]; then echo "Missing or wrong provision directory $FROMWHERE" exit 1 fi cd $FROMWHERE for d in $DIRS;do relativedirname=$(find . -type d -name "$d" -prune) n=$(echo $d | sed 's,/,_,g') if [ "$d" = "private" ]; then find $relativedirname -name "*.ldb.bak" -exec rm {} \; for ldb in $(find $relativedirname -name "*.ldb"); do if tdbbackup $ldb then :...
2015 Jan 11
1
Thoughts on samba backup script for DCs
Hello, possibly the author of the samba backup script will read this. I customized the script myself due to some things: 1. At the end the script looks for samba4_* files to rotate the backups. But only backups of the private folder get this prefix with the original script. sysvol and etc backups will remain. 2. The wiki of backup and restore advises to restore on the same version of samba the
2017 Dec 19
3
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
2016 Dec 10
0
samba_backup script doesn't use tdbbackup for tdb files?
...it now possible to simply copy open tdb files into an > archive? > > Note. > > 1. https://wiki.samba.org/index.php/Backup_and_restore_an_Samba_AD_DC > > 2. script snippet sans error handling > > if [ "$d" = "private" ]; then > find $relativedirname -name "*.ldb.bak" -exec rm {} \; > for ldb in `find $relativedirname -name "*.ldb"`; do > tdbbackup $ldb > done > tar cjf ${WHERE}/samba4_${n}.${WHEN}.tar.bz2 > $relativedirname --exclude=*.ldb >/dev/null 2>&1 >...
2016 Dec 10
0
samba_backup script doesn't use tdbbackup for tdb files?
...tdb files into an >> archive? >> >> Note. >> >> 1. https://wiki.samba.org/index.php/Backup_and_restore_an_Samba_AD_DC >> >> 2. script snippet sans error handling >> >> if [ "$d" = "private" ]; then >> find $relativedirname -name "*.ldb.bak" -exec rm {} \; >> for ldb in `find $relativedirname -name "*.ldb"`; do >> tdbbackup $ldb >> done >> tar cjf ${WHERE}/samba4_${n}.${WHEN}.tar.bz2 >> $relativedirname --exclude=*.ldb >/dev/nul...
2014 Jul 22
0
Samba4 Backup and Recovery Tutorial
...so I believe this is applicable to me? If so can someone provide me with an example of this option from within the script? Is below correct and all that's needed? I have not altered my samba default installation directory. Thanks. tar *--xattrs* cjf ${WHERE}/samba4_${n}.${WHEN}.tar.bz2 $relativedirname --exclude=*.ldb >/dev/null 2>&1 if [ $? -ne 0 ]; then echo "Error while archiving ${WHERE}/samba4_${n}.${WHEN}.tar.bz2" exit 1 fi find $relativedirname -name "*.ldb.bak&quo...
2016 Dec 10
0
samba_backup script doesn't use tdbbackup for tdb files?
...;> Note. > >> > >> 1. > >> https://wiki.samba.org/index.php/Backup_and_restore_an_Samba_AD_DC > >> > >> 2. script snippet sans error handling > >> > >> if [ "$d" = "private" ]; then > >> find $relativedirname -name "*.ldb.bak" -exec rm {} \; > >> for ldb in `find $relativedirname -name "*.ldb"`; do > >> tdbbackup $ldb > >> done > >> tar cjf ${WHERE}/samba4_${n}.${WHEN}.tar.bz2 > >> $relativedirname --e...
2014 Dec 23
0
samba backup and build
...be safely erase I did see the following diff --git a/source4/scripting/bin/samba_backup b/source4/scripting/bin/samba_backup index 75ebec6..e34981e 100755 --- a/source4/scripting/bin/samba_backup +++ b/source4/scripting/bin/samba_backup @@ -48,6 +48,10 @@ cd $FROMWHERE for d in $DIRS;do relativedirname=`find . -type d -name "$d" -prune` n=`echo $d | sed 's/\//_/g'` + + # remove all sockets + find $relativedirname -type s -exec rm {} \; which I assume implies that it is safe to remove but I just wanted to verify. And if anyone is using pax to create archiv...
2014 Aug 18
1
samba_backup script
Hi, I am trying to backup a samba DC with the samba_backup script as described in https://wiki.samba.org/index.php/Backup_and_Recovery (BTW there's a typo in a chapter title which should be samba_backup instead of backup_samba) . It works ok except that it backups also all files in the ./lib/private/ dir , which are all library files. I suspect that it is wrong , isn't it ? Regards
2014 Nov 12
1
backup script exit with error (probably because of tar warning)
..._private.121114.tar.bz2" After some troubleshooting, I noticed it is PROBABLY because of tar, issuing this warning with the exit code of 1: "tar: ./private: file changed as we read it" It is related to this line in the backup script: tar cjf ${WHERE}/samba4_${n}.${WHEN}.tar.bz2 $relativedirname --exclude=*.ldb >/ dev/null 2>&1 if [ $? -ne 0 ]; then echo "Error while archiving MYpri ${WHERE}/samba4_${n}.${WHEN}.tar.bz2" exit 1 fi I'm afraid, changing the exit condition, inorder to exclude exit code with 1, would result in unsafe backups?...
2017 Jun 05
3
Samba backup script retention question
Hello, I'm using the 'samba_backup' script with the self compiled version. I noticed the retention period not being applied to etc and sysvol tar.bz2 files. Looking at the script it appears to only list the following at the end 'find $WHERE -name "samba4_*bz2" -mtime +$DAYS -exec rm {} \;' Can I also include the etc and sysvol tars in the command? Any