Bacula-users

Re: [Bacula-users] Auto restore job

2009-10-13 12:06:40
Subject: Re: [Bacula-users] Auto restore job
From: Doug Forster <dforster AT part DOT net>
To: bacula-users AT lists.sourceforge DOT net
Date: Tue, 13 Oct 2009 09:44:50 -0600
I solved this issue by doing a cronjob to restore things.

Here is the script that I wrote to help it out.
#!/bin/sh

function runtest() {
for i in `ls /etc/bacula/clients | awk -F. '{ print $1 }'`; do
  case $i in
# Servers that don't work with the script
    server-exclude1)
      ;;
    server-exclude2)
      ;;
    *)
      sh /etc/bacula/script/restore.test $i-fd;
      ;;
  esac
done
}

function runvalidate() {
for i in `ls /etc/bacula/clients | awk -F. '{ print $1 }'`; do 
  case $i in
# Servers that don't work with the script
    server-exclude1)
      ;;
    server-exclude2)
      ;;
    *)
      sh /etc/bacula/script/restore.validate $i-fd;
      ;;
  esac
done
}

case $1 in
        Test)
                runtest
                ;;
        Validate)
                runvalidate
                ;;
        *)
                echo "Please specify Test, or Validate. "
                exit 1
                ;;
esac
exit 0

Here is the file that we used in conjunction with it. Just like the
automount script.

/usr/sbin/bconsole -c /etc/bacula/bconsole.conf <<END_OF_DATA
restore client=$1 file=/etc/bacula/testingfile.restore
2
yes
END_OF_DATA


On 09/15/2009 02:13 AM, Proskurin Kirill wrote:
> Hello.
>
> I check documentation and found what:
>
> "Restore jobs cannot be automatically started by the scheduler as is the 
> case for Backup, Verify and Admin jobs. To restore files, you must use 
> the restore command in the console."
>
> Oh... It is really no way to make this?
> I need to auto restore many backups every day.
>
>   


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>