Hi everybody,

I have server1 which creates files at
/somewhere/$YEAR/$MONTH/$DAY/ on a daily basis.

I want to restore this directory to server2.
So far, I have come up with this script:

/usr/sbin/bconsole << EOF
restore client=server1 select current strip_prefix=/somewhere/$YEAR/$MONTH/$DAY 
add_prefix=/somewhereelse/
restoreclient=server2
cd /somewhere/$YEAR/$MONTH/$DAY
mark *
done
yes
EOF 

The problem now is, if the "cd /somewhere/..." fails, then the next line
marks everything. The "cd" could fail, if the last backup of server1 didn't
run or the directory was not created for whatever reason.
Is there a way to fail if the path is not in the backup?

Cheers,
  Christoph

-- 
Christoph Kluenter                   E-Mail: supp...@iphh.net
Technik                              Tel: +49 (0)40 374919-10
IPHH Internet Port Hamburg GmbH      Fax: +49 (0)40 374919-29
Wendenstrasse 408                    AG Hamburg, HRB 76071
D-20537 Hamburg                      Geschaeftsfuehrung: Axel G. Kroeger

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to