[Samba] backup script problem with samba 4.0.10

Elyad Alaei elysamba4 at gmail.com
Wed Oct 8 07:20:52 MDT 2014


Unfortunately the number of days between each unsuccessful automatic backup
using samba_backup script are getting more and more. It's about 7 days that
samba_backup script can't do the backup! Even when I do <<# service samba4
stop>> and then run the backup script, it fails giving the error:
Error while archiving /home/admin/samba-backup/samba4_private.081014.tar.bz2

After running the script for some successive times and failing each time, I
stopped samba service again and run:
# tar cjf /home/admin/samba-backup/a.tar.bz2   /usr/local/samba/
It seemed it was archived successfully (If I don't consider some warnings
told:
"tar: /usr/local/samba/var/lib/ntp_signd/socket: socket ignored")

Then when I did run the samb_backup script again, it seemed to work
successfully (exited without error)!!!
Now:
1. Does anyone has any idea why this happens?
2. Can I consider the last backed-up files valid?!

tanx


On Sun, Sep 21, 2014 at 12:48 PM, Marc Muehlfeld <mmuehlfeld at samba.org>
wrote:

> Hello Elyad,
>
> Am 21.09.2014 um 08:56 schrieb Elyad Alaei:
> > To backup the samba database, I stop samba service at 2:00 AM every night
> > and backup using samba_backup script and re-run samba4 service with the
> > help of crontab. It could always create "samba4_private" file but
> "sysvol"
> > and "etc" files were not created in some days! (both "etc" and "sysvol"
> > files are created once in every 3 or 4 days)
>
> The backup script shipped with the sources is really basic at the moment
> (we really need something better :-)). But it should work everytime. If
> not all archives are created, then you should try to debug what fails.
>
> You can take out all >/dev/null 2>&1, and other things that suppress
> messages and also run your cronjob with "bash -x samba_backup >
> /tmp/log.txt 2>&1", to get all the output logged temporary.
>
>
> But the script is able to hotbackup the databases. You don't need to
> stop samba for it. But if you don't mind stopping samba anyway, why not
> simply "tar --xattrs ...." your whole /usr/local/samba/. Then you have
> everything. Important is just that you include the extended attributes.
> So make sure, you use a tar version, that supports it.
>
>
> Regards,
> Marc
>
>
>


More information about the samba mailing list