Hey All!
Im a long time bacula user, and finally got myself updated to v9.0.7, and i
have run into a issue with baculum i just cannot figure out how to solve.
I have everything working, except restoring using baculm. -bat and bconsole
works with no issues.
When i have chosen files to restore, and click next, i get a sql error :
Baculum problem
Error 100 - Problem with connection to remote host. cURL error 0: .
SQLSTATE[42803]: Grouping error: 7 ERROR: column "media.volumename" must appear
in the GROUP BY clause or be used in an aggregate function LINE 2: SELECT
VolumeName, InChanger, MIN(FirstIndex) as first_in... ^
0083: $connection = VolumeRecord::finder()->getDbConnection();
0084: $connection->setActive(true);
0085: $sql = sprintf('SELECT first_index, last_index, VolumeName AS
volname, InChanger AS inchanger FROM (
0086: SELECT VolumeName, InChanger, MIN(FirstIndex) as first_index,
MAX(LastIndex) as last_index
0087: FROM JobMedia JOIN Media ON (JobMedia.MediaId = Media.MediaId)
0088: WHERE JobId = %d GROUP BY (VolumeName, InChanger)
0089: ) AS gv, File
0090: WHERE FileIndex >= first_index
0091: AND FileIndex <= last_index
0092: AND File.FileId = %d', $jobid, $fileid);
0093: $pdo = $connection->getPdoInstance();
0094: $result = $pdo->query($sql);
0095: $ret = $result->fetchAll();
0096: $pdo = null;
0097: $volumes = array();
0098: if (is_array($ret)) {
0099: for ($i = 0; $i < count($ret); $i ) {
0100: $volumes[] = array(
0101: 'first_index' => $ret[$i]['first_index'],
0102: 'last_index' => $ret[$i]['last_index'],
0103: 'volume' => $ret[$i]['volname'],
0104: 'inchanger' => $ret[$i]['inchanger']
0105: );
0106: }
I started out with a quite large MySql database, but for troubleshooting, i am
running a clean posgress database.
Os is CentOS Linux release 7.5.1804 (Core)
Anybody got any good ideas ??
All the best
Ras
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users