]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/cats/drop_postgresql_tables.in
f7cf26dda89872c3df94cf2baf637cad1ab14108
[bacula/bacula] / bacula / src / cats / drop_postgresql_tables.in
1 #!/bin/sh
2 #
3 # shell script to delete Bacula tables for PostgreSQL
4
5 bindir=@SQL_BINDIR@
6
7 if $bindir/psql $* -f - <<END-OF-DATA
8 \c bacula
9 drop table unsavedfiles;
10 drop table basefiles;
11 drop table jobmedia;
12 drop table file;
13 drop table job;
14 drop table media;
15 drop table client;
16 drop table pool;
17 drop table fileset;
18 drop table path;
19 drop table filename;
20 drop table counters;
21 drop table version;
22 END-OF-DATA
23 then
24    echo "Deletion of Bacula PostgreSQL tables succeeded."
25 else
26    echo "Deletion of Bacula PostgreSQL tables failed."
27 fi
28 exit 0