Birre,
Thanks for the reply. I guess this is where I get lost...
The fifo is reading a file that was created in the pre-process called
mail.tar. The mail.tar is made from the following directories /opt/zimbra
and /var/mail/zimbra. This is where the Zimbra files and mailstore were
kept.
This pre-process is a script that has this :
*MailBackup.bash*
#!/bin/bash
exec >/dev/null
MKDIR="/bin/mkdir"
MKFIFO="/usr/bin/mkfifo"
RM="/bin/rm"
TAR="/bin/tar"
DEFCODE=0
DUMPBASE="/data/backups"
errCode=${DEFCODE}
mailDir="/var/mail/zimbra"
zimbraDir="/opt/zimbra"
Main()
{
service zimbra stop
RunMailRestore
service zimbra start
ExitScript ${errCode}
}
RunMailRestore()
{
EXTENSION=".tar"
dumpDir="${DUMPBASE}/mail"
fifoDir="${dumpDir}/fifo"
RebuildFifoDir
${MKFIFO} ${fifoDir}/mail${EXTENSION}
${TAR} -xpf ${fifoDir}/mail${EXTENSION} 2>&1 </dev/null &
}
RebuildFifoDir()
{
if [ -d ${fifoDir} ]
then
${RM} -rf ${fifoDir}
fi
${MKDIR} -p ${fifoDir}
}
ExitScript()
{
exit ${1}
}
Main
The restore script simply does a tar xpf instead of a tar cpf.
Below is the *client config* for my mail server
#********************************************************************************
# bluewhale
#********************************************************************************
Client {
Name = bluewhale
Address = bluewhale.bnesystems.com
Catalog = BS01-Catalog
Password = "xxxxxxx"
FileRetention = 30 days
JobRetention = 30 days
AutoPrune = yes
MaximumConcurrentJobs = 1
}
Job {
Name = Backup_mail_bluewhale
Enabled = yes
Type = Backup
Level = Full
Accurate = yes
Client = bluewhale
FileSet = Full_mail_bluewhale
Messages = Standard
Pool = Pool_mail_bluewhale
Schedule = Schedule_mail_bluewhale
MaxRunTime = 6 hours
MaxStartDelay = 1 hour
ClientRunBeforeJob = "/nas/users/admin/scripts/MailBackup.bash"
ClientRunAfterJob = "/nas/users/admin/scripts/MailCleanup.bash"
AllowDuplicateJobs = no
CancelQueuedDuplicates = yes
RunScript {
Command="/nas/users/admin/scripts/MailCleanup.bash"
RunsWhen=After
RunsOnFailure=yes
RunsOnClient=yes
RunsOnSuccess=no
}
}
Job {
Name = Restore_mail_bluewhale
FileSet = Full_mail_bluewhale
Type = Restore
Pool = Pool_mail_bluewhale
Client = bluewhale
Messages = Standard
ClientRunBeforeJob = "/nas/users/admin/scripts/MailRestore.bash"
ClientRunAfterJob = "/nas/users/admin/scripts/MailCleanup.bash"
RunScript {
Command="/nas/users/admin/scripts/MailCleanup.bash"
RunsWhen=After
RunsOnFailure=yes
RunsOnClient=yes
RunsOnSuccess=no
}
}
Job {
Name = Backup_os_bluewhale
Enabled = yes
Type = Backup
Level = Full
Accurate = yes
Client = bluewhale
FileSet = Full_os_bluewhale
Messages = Standard
Pool = Pool_os_bluewhale
Schedule = Schedule_os_bluewhale
MaxRunTime = 6 hours
IncrementalMaxRunTime = 2 hours
DifferentialMaxRunTime = 4 hours
AllowDuplicateJobs = no
CancelQueuedDuplicates = yes
}
Job {
Name = Restore_os_bluewhale
FileSet = Full_os_bluewhale
Type = Restore
Pool = Pool_os_bluewhale
Client = bluewhale
Messages = Standard
}
Pool {
Name = Pool_mail_bluewhale
PoolType = Backup
Storage = Storage_bluewhale
MaximumVolumeJobs = 1
CatalogFiles = yes
AutoPrune = yes
VolumeRetention = 365 days
Recycle = yes
LabelFormat = "mail-"
}
Pool {
Name = Pool_os_bluewhale
PoolType = Backup
Storage = Storage_bluewhale
MaximumVolumeJobs = 1
CatalogFiles = yes
AutoPrune = yes
VolumeRetention = 365 days
Recycle = yes
LabelFormat = "os-"
}
Storage {
Name = Storage_bluewhale
Address = 10.10.10.199
SDPort = 9103
Password = "imadirector"
Device = File_bluewhale
MediaType = NAS_bluewhale
MaximumConcurrentJobs = 1
}
Schedule {
Name = Schedule_mail_bluewhale
Run = Level=Full sun-sat at 01:00
}
Schedule {
Name = Schedule_os_bluewhale
Run = Level=Full 1st,3rd sun at 00:00
Run = Level=Differential 2nd,4th sun at 00:00
Run = Level=Incremental mon-sat at 00:00
}
FileSet {
Name = Full_mail_bluewhale
Include {
Options {
signature=SHA1
readfifo=yes
}
File="/data/backups/mail/fifo/mail.tar"
}
}
FileSet {
Name = Full_os_bluewhale
Include {
Options {
compression=GZIP5
onefs=no
recurse=yes
hardlinks=yes
WildDir=".gvfs"
WildDir="lost+found"
Exclude=yes
}
File="/"
}
Exclude {
File="/cdrom"
File="/data/backups"
File="/data/downloads"
File="/data/spool"
File="/data/tmp"
File="/dev"
File="/mnt"
File="/nas"
File="/opt/zimbra"
File="/proc"
File="/sys"
File="/tmp"
File="/var/mail/zimbra"
}
}
So why doesn't the name pipe rebuild the file??
Thanks --Kenny
On Fri, Sep 5, 2014 at 2:30 PM, Birger Blixt <bi...@virtualgate.org> wrote:
> 2014-09-05 17:56, Kenny Noe skrev:
> >
> > I get a zero size mail.tar file in the destination location, so I know
> > the changes in location works. Should I post mf conf files?? Please
> > advise...
> >
> > Thanks --kenny
> It's not a file, it's a named pipe (fifo)
>
> /nas/users/admin/backups/data/backups/mail/fifo/mail.tar
> You must figure out what was reading that fifo and where it stored the
> data.
>
> /Birre
>
>
>
>
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users