Hai Kevin, I to have more dc's but same as what your saying..> In general that's fine if all you care about is being able to recreate a > failed DC (after hardware failure or bad system update). It's no use in > protecting you against user/sysadmin error where you make large, but > unwanted changes to your directory (like accidentally deleting 200 users) > and you want to reset it to the previous day's state.For that, check : https://github.com/thctlo/samba4 and run it in cron as much u want. Result is like what you want, im ok with 5 backups a day. (next to the normal backups)>lssamba-2016-07-18-0.tar.bz2 samba-2016-07-18-1.tar.bz2 samba-2016-07-18-2.tar.bz2 samba-2016-07-18-3.tar.bz2 samba-2016-07-18-4.tar.bz2 samba-2016-07-19-0.tar.bz2 samba-2016-07-19-1.tar.bz2 samba-2016-07-19-2.tar.bz2 samba-2016-07-19-3.tar.bz2 samba-2016-07-19-4.tar.bz2 Greetz, Louis
Hi all, as for samba sernet installation, the etc direction is located in to /etc and the private in to /var/lib/samba, as the sysvol to /var/lib/samba also, i adjust the parameter FROMWHERE=/usr/local/samba to : FROMWHERE=/etc/samba FROMWHERE=/var/lib/samba/private FROMWHERE=/usr/local/samba/sysvol WHERE=/usr/local/backups When I run the script , i receive a tar error that said : tar refuse to create an empty file Error while archiving /usr/local/backups/samba4_private.2016_7_26.tar.bz2 -status=2 I though /usr/local/backups is the destination for backup files that will be created. For me, It seems that the script is looking for files in /usr/local/backups and as it is a empty directory, it is rejected. Thank you for your time and helping Regards On Tue, Jul 26, 2016 at 3:38 PM, L.P.H. van Belle <belle at bazuin.nl> wrote:> Hai Kevin, > > I to have more dc's but same as what your saying.. > > In general that's fine if all you care about is being able to recreate a > > failed DC (after hardware failure or bad system update). It's no use in > > protecting you against user/sysadmin error where you make large, but > > unwanted changes to your directory (like accidentally deleting 200 users) > > and you want to reset it to the previous day's state. > > For that, check : > https://github.com/thctlo/samba4 > > and run it in cron as much u want. > > Result is like what you want, im ok with 5 backups a day. > (next to the normal backups) > > >ls > samba-2016-07-18-0.tar.bz2 > samba-2016-07-18-1.tar.bz2 > samba-2016-07-18-2.tar.bz2 > samba-2016-07-18-3.tar.bz2 > samba-2016-07-18-4.tar.bz2 > > samba-2016-07-19-0.tar.bz2 > samba-2016-07-19-1.tar.bz2 > samba-2016-07-19-2.tar.bz2 > samba-2016-07-19-3.tar.bz2 > samba-2016-07-19-4.tar.bz2 > > > Greetz, > > Louis > > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba >-- Jules HOUANTONON *Phone* : (00229) 97578914 *Email *: juleshoueto at gmail.com *Skype* : houantonon *linkedin* : www.linkedin.com/in/jhouantonon/en
Get the script from github.. https://github.com/thctlo/samba4/tree/master/backup-script and only change these 2. This one is generated by the script, it speeds up the cron job. SCRIPT_COMMANDS_FILE="/etc/samba/backup_samba4_commands" And the location of where your backups go. STOREDIR=/home/backups/`hostname –s` Run it and it works ;-) , if not i ow you.. ;-) Greetz, Louis Van: Jules Houantonon [mailto:juleshoueto at gmail.com] Verzonden: dinsdag 26 juli 2016 17:01 Aan: L.P.H. van Belle CC: samba at lists.samba.org; Kevin Davidson Onderwerp: Re: [Samba] how to backup samba ad domain Hi all, as for samba sernet installation, the etc direction is located in to /etc and the private in to /var/lib/samba, as the sysvol to /var/lib/samba also, i adjust the parameter FROMWHERE=/usr/local/samba to : FROMWHERE=/etc/samba FROMWHERE=/var/lib/samba/private FROMWHERE=/usr/local/samba/sysvol WHERE=/usr/local/backups When I run the script , i receive a tar error that said : tar refuse to create an empty file Error while archiving /usr/local/backups/samba4_private.2016_7_26.tar.bz2 -status=2 I though /usr/local/backups is the destination for backup files that will be created. For me, It seems that the script is looking for files in /usr/local/backups and as it is a empty directory, it is rejected. Thank you for your time and helping Regards On Tue, Jul 26, 2016 at 3:38 PM, L.P.H. van Belle <belle at bazuin.nl> wrote: Hai Kevin, I to have more dc's but same as what your saying..> In general that's fine if all you care about is being able to recreate a > failed DC (after hardware failure or bad system update). It's no use in > protecting you against user/sysadmin error where you make large, but > unwanted changes to your directory (like accidentally deleting 200 users) > and you want to reset it to the previous day's state.For that, check : https://github.com/thctlo/samba4 and run it in cron as much u want. Result is like what you want, im ok with 5 backups a day. (next to the normal backups)>lssamba-2016-07-18-0.tar.bz2 samba-2016-07-18-1.tar.bz2 samba-2016-07-18-2.tar.bz2 samba-2016-07-18-3.tar.bz2 samba-2016-07-18-4.tar.bz2 samba-2016-07-19-0.tar.bz2 samba-2016-07-19-1.tar.bz2 samba-2016-07-19-2.tar.bz2 samba-2016-07-19-3.tar.bz2 samba-2016-07-19-4.tar.bz2 Greetz, Louis -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba -- Jules HOUANTONON Phone : (00229) 97578914 Email : juleshoueto at gmail.com Skype : houantonon linkedin : www.linkedin.com/in/jhouantonon/en
On 26/07/16 16:01, Jules Houantonon wrote:> Hi all, > > as for samba sernet installation, the etc direction is located in to /etc > and the private in to /var/lib/samba, as the sysvol to /var/lib/samba also, > > i adjust the parameter FROMWHERE=/usr/local/samba to : > > FROMWHERE=/etc/samba > FROMWHERE=/var/lib/samba/private > FROMWHERE=/usr/local/samba/sysvol > WHERE=/usr/local/backupsWhich script are you using ? If it is the standard Samba script, I would think you can only specify 'FROMWHERE' once. Rowland> When I run the script , i receive a tar error that said : > > tar refuse to create an empty file > Error while archiving /usr/local/backups/samba4_private.2016_7_26.tar.bz2 > -status=2 > > I though /usr/local/backups is the destination for backup files that will > be created. > For me, It seems that the script is looking for files in /usr/local/backups > and as it is a empty directory, it is rejected. > > Thank you for your time and helping > > Regards > > > >
I have one DC in Samba 4.3.9-Ubuntu Server I set the backup script and it is working properly! The restore test it is OK for me! I scheduled via CRON and the backup takes one minute only to run *#!/bin/bash* *####################################* *#* *# Samba_AD backup script* *#* *####################################* *# Stop Samba* */etc/init.d/samba stop* *# What to backup* *backup_files="/etc/samba /var/lib/samba"* *# Where to backup to* *dest="/BACKUP"* *# Create archive filename* *day=$(date +%Y_%m_%d_%H%M)* *hostname=$(hostname -s)* *archive_file="$hostname-$day.tgz"* *# Backup the files using tar* *tar --acls --xattrs -czf $dest/$archive_file $backup_files* *# Start Samba* */etc/init.d/samba start* Anderson Hoffmann do Carmo MCP | MTA | MCDST | MCTS | MCSA | MS | MOS | ITIL-F | ISFS | CLOUDF | CI-SCS | VCA-DCV | 2016-07-26 12:01 GMT-03:00 Jules Houantonon <juleshoueto at gmail.com>:> Hi all, > > as for samba sernet installation, the etc direction is located in to /etc > and the private in to /var/lib/samba, as the sysvol to /var/lib/samba also, > > i adjust the parameter FROMWHERE=/usr/local/samba to : > > FROMWHERE=/etc/samba > FROMWHERE=/var/lib/samba/private > FROMWHERE=/usr/local/samba/sysvol > WHERE=/usr/local/backups > > When I run the script , i receive a tar error that said : > > tar refuse to create an empty file > Error while archiving /usr/local/backups/samba4_private.2016_7_26.tar.bz2 > -status=2 > > I though /usr/local/backups is the destination for backup files that will > be created. > For me, It seems that the script is looking for files in /usr/local/backups > and as it is a empty directory, it is rejected. > > Thank you for your time and helping > > Regards > > > > On Tue, Jul 26, 2016 at 3:38 PM, L.P.H. van Belle <belle at bazuin.nl> wrote: > > > Hai Kevin, > > > > I to have more dc's but same as what your saying.. > > > In general that's fine if all you care about is being able to recreate > a > > > failed DC (after hardware failure or bad system update). It's no use in > > > protecting you against user/sysadmin error where you make large, but > > > unwanted changes to your directory (like accidentally deleting 200 > users) > > > and you want to reset it to the previous day's state. > > > > For that, check : > > https://github.com/thctlo/samba4 > > > > and run it in cron as much u want. > > > > Result is like what you want, im ok with 5 backups a day. > > (next to the normal backups) > > > > >ls > > samba-2016-07-18-0.tar.bz2 > > samba-2016-07-18-1.tar.bz2 > > samba-2016-07-18-2.tar.bz2 > > samba-2016-07-18-3.tar.bz2 > > samba-2016-07-18-4.tar.bz2 > > > > samba-2016-07-19-0.tar.bz2 > > samba-2016-07-19-1.tar.bz2 > > samba-2016-07-19-2.tar.bz2 > > samba-2016-07-19-3.tar.bz2 > > samba-2016-07-19-4.tar.bz2 > > > > > > Greetz, > > > > Louis > > > > > > > > -- > > To unsubscribe from this list go to the following URL and read the > > instructions: https://lists.samba.org/mailman/options/samba > > > > > > -- > Jules HOUANTONON > *Phone* : (00229) 97578914 > *Email *: juleshoueto at gmail.com > *Skype* : houantonon > *linkedin* : www.linkedin.com/in/jhouantonon/en > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba >
My friend, you ow me a lot then. :D I receive an error on the line 179 ${CMD_AWK} -F '.' '{print $2}') if [ -n "${TARVERSION}" ] && [ " ${TARVERSION}" -ge "27" ]; then It is about Incorrect syntaxt. A syntax where not expected before the then. I am using Centos 7.2 and samba-sernet 4.2 Thank you again On Tue, Jul 26, 2016 at 4:11 PM, L.P.H. van Belle <belle at bazuin.nl> wrote:> Get the script from github.. > > https://github.com/thctlo/samba4/tree/master/backup-script > > > > and only change these 2. > > > > This one is generated by the script, it speeds up the cron job. > > SCRIPT_COMMANDS_FILE="/etc/samba/backup_samba4_commands" > > > > And the location of where your backups go. > > STOREDIR=/home/backups/`hostname –s` > > > > Run it and it works ;-) , if not i ow you.. ;-) > > > > > > Greetz, > > > > Louis > > > > > > > ------------------------------ > > *Van:* Jules Houantonon [mailto:juleshoueto at gmail.com] > *Verzonden:* dinsdag 26 juli 2016 17:01 > *Aan:* L.P.H. van Belle > *CC:* samba at lists.samba.org; Kevin Davidson > *Onderwerp:* Re: [Samba] how to backup samba ad domain > > > > Hi all, > > > > as for samba sernet installation, the etc direction is located in to /etc > and the private in to /var/lib/samba, as the sysvol to /var/lib/samba also, > > > > i adjust the parameter FROMWHERE=/usr/local/samba to : > > > > FROMWHERE=/etc/samba > > FROMWHERE=/var/lib/samba/private > > FROMWHERE=/usr/local/samba/sysvol > > WHERE=/usr/local/backups > > > > When I run the script , i receive a tar error that said : > > > > tar refuse to create an empty file > > Error while archiving /usr/local/backups/samba4_private.2016_7_26.tar.bz2 > -status=2 > > > > I though /usr/local/backups is the destination for backup files that will > be created. > > For me, It seems that the script is looking for files in > /usr/local/backups and as it is a empty directory, it is rejected. > > > > Thank you for your time and helping > > > > Regards > > > > > > > > On Tue, Jul 26, 2016 at 3:38 PM, L.P.H. van Belle <belle at bazuin.nl> wrote: > > Hai Kevin, > > I to have more dc's but same as what your saying.. > > In general that's fine if all you care about is being able to recreate a > > failed DC (after hardware failure or bad system update). It's no use in > > protecting you against user/sysadmin error where you make large, but > > unwanted changes to your directory (like accidentally deleting 200 users) > > and you want to reset it to the previous day's state. > > For that, check : > https://github.com/thctlo/samba4 > > and run it in cron as much u want. > > Result is like what you want, im ok with 5 backups a day. > (next to the normal backups) > > >ls > samba-2016-07-18-0.tar.bz2 > samba-2016-07-18-1.tar.bz2 > samba-2016-07-18-2.tar.bz2 > samba-2016-07-18-3.tar.bz2 > samba-2016-07-18-4.tar.bz2 > > samba-2016-07-19-0.tar.bz2 > samba-2016-07-19-1.tar.bz2 > samba-2016-07-19-2.tar.bz2 > samba-2016-07-19-3.tar.bz2 > samba-2016-07-19-4.tar.bz2 > > > Greetz, > > Louis > > > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba > > > > > > -- > > Jules HOUANTONON > *Phone* : (00229) 97578914 > *Email *: juleshoueto at gmail.com > *Skype* : houantonon > *linkedin* : www.linkedin.com/in/jhouantonon/en >-- Jules HOUANTONON *Phone* : (00229) 97578914 *Email *: juleshoueto at gmail.com *Skype* : houantonon *linkedin* : www.linkedin.com/in/jhouantonon/en