Hi, I use AptVanBelle repo for samba, is there a way to backup in unattended way (I mean via cron) the DC? If I use samba-tool domain backup online --targetdir=/srv/backup --serversamba4.example.com -k yes -d1 It works, by it ask for password Administrator. What is the best practice to do it? Thanks in advance! -- -- Sergio Belkin LPIC-2 Certified - http://www.lpi.org
El mi?., 11 sept. 2019 a las 15:14, Sergio Belkin (<sebelk at gmail.com>) escribi?:> Hi, > > I use AptVanBelle repo for samba, is there a way to backup in unattended > way (I mean via cron) the DC? > > If I use > samba-tool domain backup online --targetdir=/srv/backup --server> samba4.example.com -k yes -d1 > > It works, by it ask for password Administrator. > > What is the best practice to do it? > > Thanks in advance! > -- > -- > Sergio Belkin > LPIC-2 Certified - http://www.lpi.org >Shame on me :) I've found this wonderful thing: https://github.com/thctlo/samba4/tree/master/backup-script -- -- Sergio Belkin LPIC-2 Certified - http://www.lpi.org
On Wed, 2019-09-11 at 15:14 -0300, Sergio Belkin via samba wrote:> Hi, > > I use AptVanBelle repo for samba, is there a way to backup in unattended > way (I mean via cron) the DC? > > If I use > samba-tool domain backup online --targetdir=/srv/backup --server> samba4.example.com -k yes -d1 > > It works, by it ask for password Administrator. > > What is the best practice to do it?The offline backup can be done unattended. It may also be possible to to the online backup unattended using the DC's own password using --machine-pass, but I've not tried that yet (sorry). Andrew Bartlett -- Andrew Bartlett http://samba.org/~abartlet/ Authentication Developer, Samba Team http://samba.org Samba Developer, Catalyst IT http://catalyst.net.nz/services/samba
On 11/09/2019 19:14, Sergio Belkin via samba wrote:> Hi, > > I use AptVanBelle repo for samba, is there a way to backup in unattended > way (I mean via cron) the DC? > > If I use > samba-tool domain backup online --targetdir=/srv/backup --server> samba4.example.com -k yes -d1 > > It works, by it ask for password Administrator. > > What is the best practice to do it? > > Thanks in advance!We had this recently and for some reason, you get prompted for the Administrator password when it tries to backup sysvol, thing is, it just prompts for the password, it doesn't need it. If you just press 'Enter' it completes the backup successfully. So just add 'echo | ' to the start of the samba-tool command. Rowland
On 11/09/2019 19:35, Sergio Belkin via samba wrote:> El mi?., 11 sept. 2019 a las 15:14, Sergio Belkin (<sebelk at gmail.com>) > escribi?: > >> Hi, >> >> I use AptVanBelle repo for samba, is there a way to backup in unattended >> way (I mean via cron) the DC? >> >> If I use >> samba-tool domain backup online --targetdir=/srv/backup --server>> samba4.example.com -k yes -d1 >> >> It works, by it ask for password Administrator. >> >> What is the best practice to do it? >> >> Thanks in advance! >> -- >> -- >> Sergio Belkin >> LPIC-2 Certified - http://www.lpi.org >> > Shame on me :) > > I've found this wonderful thing: > > https://github.com/thctlo/samba4/tree/master/backup-script >Well, DO NOT use it. Rowland
On 11/09/2019 19:36, Andrew Bartlett via samba wrote:> On Wed, 2019-09-11 at 15:14 -0300, Sergio Belkin via samba wrote: >> Hi, >> >> I use AptVanBelle repo for samba, is there a way to backup in unattended >> way (I mean via cron) the DC? >> >> If I use >> samba-tool domain backup online --targetdir=/srv/backup --server>> samba4.example.com -k yes -d1 >> >> It works, by it ask for password Administrator. >> >> What is the best practice to do it? > The offline backup can be done unattended. > > It may also be possible to to the online backup unattended using the > DC's own password using --machine-pass, but I've not tried that yet > (sorry). > > Andrew Bartlett >I have, it doesn't work ;-) Rowland