www/content/blog/miscellaneous/bacula-bareos.md

41 lines
1 KiB
Markdown
Raw Normal View History

2020-04-28 17:29:52 +02:00
---
title: "Some bacula/bareos commands"
date: 2018-01-10
2021-03-11 23:15:31 +01:00
description: some usefull commands when dealing with bacula or bareos
tags:
- backups
2020-04-28 17:29:52 +02:00
---
2021-03-11 23:15:31 +01:00
## Introduction
2020-04-28 17:29:52 +02:00
Bacula is a backup software, bareos is a fork of it. Here are some tips and solutions to specific problems.
## Adjust an existing volume for pool configuration changes
In bconsole, run the following commands and follow the prompts :
```sh
2020-04-28 17:29:52 +02:00
update pool from resource
update all volumes in pool
```
2020-04-28 17:29:52 +02:00
## Using bextract
On the sd you need to have a valid device name with the path to your tape, then run :
```sh
2020-04-28 17:29:52 +02:00
bextract -V <volume names separated by |> <device-name>
<directory-to-store-files>
```
2020-04-28 17:29:52 +02:00
## Integer out of range sql error
If you get an sql error `integer out of range` for an insert query in the catalog, check the id sequence for the table which had the error. For
example with the basefiles table :
```sql
2020-04-28 17:29:52 +02:00
select nextval('basefiles_baseid_seq');
```
2020-04-28 17:29:52 +02:00
You can then fix it with :
```sql
2020-04-28 17:29:52 +02:00
alter table BaseFiles alter column baseid set data type bigint;
```