[bareos-users] Re: Struggling with FileSet Configuration for Wildcard directories in Path

2020-03-09 Thread Julian Meyer
Hi,

I found a solution that worked for me. I use a external program to find the 
directories:
File = /etc
File = /opt
File = "\\|find /var/lib/cassandra/data -mindepth 2 -maxdepth 3 -type d 
-name snapshots"

maybe this helps some other people

Regards
Julian


Am Donnerstag, 5. März 2020 10:44:56 UTC+1 schrieb Julian Meyer:
>
> Hi,
>
> im struggling with setting up a FileSet Configuration for a Cassandra 
> Database Server. The Target is to backup the configuration of the server 
> and the snapshot (= dumps of database) directories. 
>
> I like to have this structure in my Backup:
>
> /etc/ <- All Files and directories below
> /opt/ <- All Files and directories below
> /var/lib/cassandra/data/.*/.*/snapshots/* <- All Files under the snapshot 
> directory, not before. But here have the wildcards in the path to be 
> resolved. 
>
>
> Example for the cassandra wildcard snapshots:
> /var/lib/cassandra/data///snapshots/db_file.1
> /var/lib/cassandra/data///snapshots/db_file.2
> /var/lib/cassandra/data///snapshots/db_file.3
> /var/lib/cassandra/data///snapshots/db_file.1
> /var/lib/cassandra/data///snapshots/db_file.2
> /var/lib/cassandra/data///snapshots/db_file.1
> /var/lib/cassandra/data///snapshots/db_file.2
> /var/lib/cassandra/data///snapshots/db_file.3
>
>
> I know, I have to use excludes. I've tried many ways, but don't get it to 
> run
>
> FileSet {
>   Name = "LinuxDB_Cassandra"
>   Include {
> Options {
>   Signature = MD5 # calculate md5 checksum per file
>   One FS = No # change into other filessytems
>   Compression = GZIP # Default of GZIP = GZIP6
>   FS Type = btrfs
>   FS Type = ext2  # filesystems of given types will be backed up
>   FS Type = ext3  # others will be ignored
>   FS Type = ext4
>   FS Type = reiserfs
>   FS Type = jfs
>   FS Type = xfs
>   FS Type = zfs
> }
>
> File = /etc
> File = /opt
> File = /var/lib/cassandra/data
>
> Options {
> RegexFile = "/var/lib/cassandra/data/.*/.*/.*"
> exclude = yes
> IgnoreCase = yes
> }
>   }
> }
>
>
> I'm Using bareos 18.2.5 on Ubuntu 18.04 LTS
>
> Hope someone can help me, or give me a good hint.
>
> Best Regards,
> Julian
>

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bareos-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/6fca35c2-19eb-42a0-89d0-b45952d1bf0d%40googlegroups.com.


Re: [bareos-users] Struggling with FileSet Configuration for Wildcard directories in Path

2020-03-09 Thread Andreas Rogge
Am 05.03.20 um 10:44 schrieb Julian Meyer:
> Hi,
> 
> im struggling with setting up a FileSet Configuration for a Cassandra
> Database Server. The Target is to backup the configuration of the server
> and the snapshot (= dumps of database) directories. 

Add a second Include{}-Block to your Fileset and use WildFile to include
only the files you want:

Include {
  Options {
WildFile =  /var/lib/cassandra/data/*/*/snapshots/*
  }
  File = /var/lib/cassandra/data
}
(this is untested, but I think it should work)

You can see if that matches the files you want with "estimate
job= listing"

Best Regards,
Andreas

-- 
  Andreas Rogge andreas.ro...@bareos.com
  Bareos GmbH & Co. KG  Phone: +49 221-630693-86
  http://www.bareos.com

  Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
  Komplementär: Bareos Verwaltungs-GmbH
  Geschäftsführer: S. Dühr, M. Außendorf, J. Steffens, Philipp Storz

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bareos-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/fa775409-be88-a2b5-5f03-f5e4a081b3a4%40bareos.com.


signature.asc
Description: OpenPGP digital signature


[bareos-users] Howto move postgresql to another share?

2020-03-09 Thread 'DUCARROZ Birgit' via bareos-users

Hi list,

I wonder how it is the safest way to move my database from 
/var/lib/postgresql to a bigger disk


Actually my local disk /dev/sdb1 has a size of 157G and the database 
consumes already 80G. In 2 months I will be out of space.


Please can you help me? I'm a total newbe with postresql

Regards,
Birgit

--
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bareos-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/887d7438-7982-d054-909f-7fd94ab8c8db%40unifr.ch.


Re: [bareos-users] Howto move postgresql to another share?

2020-03-09 Thread Spadajspadaj

Every way is safe as long as you prepare for it :-)

But seriously, you have two main options

1) Do a database dump and restore to a bigger server. (the "logical 
migration")


2) Stop the postgresql service, make a new filesystem on a bigger 
device, move the database files there and mount the device under 
/var/lib/postgresql. (the "physical migration").


I'm sure there are tons of howtos around the web since that's not 
bareos-specific topic.


Of course if you move your database to a different server you'll have to 
point the bareos director to the new server (update the config).


Best regards

MK

On 09.03.2020 11:59, 'DUCARROZ Birgit' via bareos-users wrote:

Hi list,

I wonder how it is the safest way to move my database from 
/var/lib/postgresql to a bigger disk


Actually my local disk /dev/sdb1 has a size of 157G and the database 
consumes already 80G. In 2 months I will be out of space.


Please can you help me? I'm a total newbe with postresql

Regards,
Birgit



--
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bareos-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/f5bcd381-ba33-ceec-8976-45a38d8483be%40gmail.com.


[bareos-users] Re: How to execute a Script after and before job?

2020-03-09 Thread Goncalo Sousa
And how do I set to execute the script on the client? 

For example: The script is located on the client and I want to execute it 
from it?

sexta-feira, 6 de Março de 2020 às 16:32:46 UTC, Andrei Brezan escreveu:
>
> You need to put the script as the value:
>
> RunBeforeJob="/path/to/my/script"
>
> On Friday, 6 March 2020 16:52:26 UTC+1, Goncalo Sousa wrote:
>>
>> So as far as I know I add the option: RunAfterJob=yes and 
>> RunBeforeJob=yes in bareos-dir.d/job but how do I call the script?
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bareos-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/a2d8abb9-abd4-49a5-af0a-5f278e16db0b%40googlegroups.com.


[bareos-users] Re: How to execute a Script after and before job?

2020-03-09 Thread Andrei Brezan
Just look at the 
documentation: https://docs.bareos.org/Configuration/Director.html#job-resource
You can have Client Run Before Job and Client Run After Job.

--
Andrei

On Monday, 9 March 2020 13:19:31 UTC+1, Goncalo Sousa wrote:
>
> And how do I set to execute the script on the client? 
>
> For example: The script is located on the client and I want to execute it 
> from it?
>
> sexta-feira, 6 de Março de 2020 às 16:32:46 UTC, Andrei Brezan escreveu:
>>
>> You need to put the script as the value:
>>
>> RunBeforeJob="/path/to/my/script"
>>
>> On Friday, 6 March 2020 16:52:26 UTC+1, Goncalo Sousa wrote:
>>>
>>> So as far as I know I add the option: RunAfterJob=yes and 
>>> RunBeforeJob=yes in bareos-dir.d/job but how do I call the script?
>>>
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bareos-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/1a4a733d-61f1-451c-8c1d-b3b49801ba19%40googlegroups.com.


[bareos-users] Re: How to execute a Script after and before job?

2020-03-09 Thread Goncalo Sousa
Basically edit /etc/bareos/bareos-dir.d/job/server.conf and add 
'ClientRunBeforeJob=/path/to/script/in/client' is this it?

segunda-feira, 9 de Março de 2020 às 12:26:02 UTC, Andrei Brezan escreveu:
>
> Just look at the documentation: 
> https://docs.bareos.org/Configuration/Director.html#job-resource
> You can have Client Run Before Job and Client Run After Job.
>
> --
> Andrei
>
> On Monday, 9 March 2020 13:19:31 UTC+1, Goncalo Sousa wrote:
>>
>> And how do I set to execute the script on the client? 
>>
>> For example: The script is located on the client and I want to execute it 
>> from it?
>>
>> sexta-feira, 6 de Março de 2020 às 16:32:46 UTC, Andrei Brezan escreveu:
>>>
>>> You need to put the script as the value:
>>>
>>> RunBeforeJob="/path/to/my/script"
>>>
>>> On Friday, 6 March 2020 16:52:26 UTC+1, Goncalo Sousa wrote:

 So as far as I know I add the option: RunAfterJob=yes and 
 RunBeforeJob=yes in bareos-dir.d/job but how do I call the script?




-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bareos-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/87d417ed-228f-4b8a-bdd5-4484922efb2c%40googlegroups.com.


[bareos-users] Re: How to execute a Script after and before job?

2020-03-09 Thread Goncalo Sousa
I configured this way on /etc/bareos/bareos-dir.d/job/server.conf

Job {
  Name = "server-job"
  Client = server-fd
  Type = Backup
  Level = Incremental
  FileSet = "server-fs"
  Schedule = "schedule"
  Storage = server-sd
  Messages = Standard
  Pool = pool-server
  Priority = 10
  Write Bootstrap = "/var/lib/bareos/%c.bsr"
  Client Run Before Job = /root/pre_backup.sh
  Client Run After Job = /root/pre_backup.sh
}

The script is located in the client side. It is giving me the following 
errors: 

server-fd JobId 3954: shell command: run ClientBeforeJob 
"/root/pre_backup.sh"
server-fd JobId 3954: ClientBeforeJob: the input device is not a TTY
server-fd JobId 3954: Error: Runscript: ClientBeforeJob returned non-zero 
status=1. ERR=Child exited with code 1
bareos-dir JobId 3954: Start Backup JobId 3954, 
Job=server-job.2020-03-09_14.56.25_04
bareos-dir JobId 3954: Using Device "server-sd" to write.
bareos-dir JobId 3954: Fatal error: Bad response to RunBeforeNow command: 
wanted 2000 OK RunBeforeNow, got 2905 Failed RunScript
bareos-dir JobId 3954: Fatal error: Client "server-fd" RunScript failed

segunda-feira, 9 de Março de 2020 às 12:26:02 UTC, Andrei Brezan escreveu:
>
> Just look at the documentation: 
> https://docs.bareos.org/Configuration/Director.html#job-resource
> You can have Client Run Before Job and Client Run After Job.
>
> --
> Andrei
>
> On Monday, 9 March 2020 13:19:31 UTC+1, Goncalo Sousa wrote:
>>
>> And how do I set to execute the script on the client? 
>>
>> For example: The script is located on the client and I want to execute it 
>> from it?
>>
>> sexta-feira, 6 de Março de 2020 às 16:32:46 UTC, Andrei Brezan escreveu:
>>>
>>> You need to put the script as the value:
>>>
>>> RunBeforeJob="/path/to/my/script"
>>>
>>> On Friday, 6 March 2020 16:52:26 UTC+1, Goncalo Sousa wrote:

 So as far as I know I add the option: RunAfterJob=yes and 
 RunBeforeJob=yes in bareos-dir.d/job but how do I call the script?




-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bareos-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/d17e083e-ae37-4dce-881c-ddeefdb43c0a%40googlegroups.com.