Hi I was confused
in the doc: https://www.bacula.org/9.6.x-manuals/en/main/Released_Version_3_0_3_3_0_.html#SECTION0011219000000000000000 he understood the use of the fields. Field4: /bin/cat > /tmp/mybbdd.sql But. "NO understood" this: Case 1: Backup number 400 with bpipe:/test/mybbdd.sql:/opt/bacula/log/mysqldump.sh mybbdd:/opt/bacula/log/mysqldump.sh -R Result: OK Restore of Backup 400 with bpipe:/test/mybbdd.sql:/opt/bacula/log/mysqldump.sh mybbdd:/opt/bacula/log/mysqldump.sh -R Result: OK Case 2: Edit FileSet: update field4 /bin/cat > /tmp/mybbdd.sql Restore of Backup 400 with bpipe:/test/mybbdd.sql:/opt/bacula/log/mysqldump.sh mybbdd:/bin/cat > /tmp/mybbdd.sql Result: FAIL Case 3: Backup number 401 with bpipe:/test/mybbdd.sql:/opt/bacula/log/mysqldump.sh mybbdd:/bin/cat > /tmp/mybbdd.sql Result: OK Restore of Backup 401 with bpipe:/test/mybbdd.sql:/opt/bacula/log/mysqldump.sh mybbdd:/bin/cat > /tmp/mybbdd.sql Result: OK Case 4: Edit FileSet: update field4 /opt/bacula/log/mysqldump.sh Restore of Backup 401 with bpipe:/test/mybbdd.sql:/opt/bacula/log/mysqldump.sh mybbdd:/opt/bacula/log/mysqldump.sh -R Result: FAIL Using bpipe when backing up would seem to save the restore method. Español: Al utilizar bpipe al respaldar, pareciera que guardara (fijara) el método de restauración. On Tue, Apr 21, 2020 at 8:43 AM Martin Simmons <mar...@lispworks.com> wrote: > >>>>> On Tue, 21 Apr 2020 14:13:11 +0200, Radosław Korzeniewski said: > > > > Hello, > > > > pon., 20 kwi 2020 o 19:30 Jose Alberto <j.se...@gmail.com> napisał(a): > > > > > Hi. > > > > > > 1) Its Possiible save file mybbdd.sql when exe restore?? I don't want > > >>> the bbdd to be restored automatically. for test,i Delete line > > >>> mybbdd:/......mysqldump.sh -R but fails. > > >>> > > >> > > >> The short answer is - Yes. You can do it without a problem. But I do > not > > >> understand what is not working in your case. So I cannot help you. > > >> > > >> rados...@korzeniewski.net > > >> > > > > > > When try restore in another client (file .sql), it fails. > > > > > > When restore in same client, good. But restore directly in the > bbdd. > > > > > > I dont know restore without restore directly in BBDD. I want > restore > > > only file .sql place it in any folder of the filesystem. > > > > > > > I still do not understand. And you did not provide any error logs. So, I > do > > not know how to help. Sorry. > > > > The bpipe plugin works in such a way that it uses two scripts provided by > > backup admin to handle backup and restore streams on stdout/stdin. > > The first script is used for backup jobs and the second one for restore > > jobs respectively. When doing backup the script is responsible for > > generating archive data stream on its stdout. So the restore script is > > responsible for reading the archive data stream on its stdin and > performing > > the restore. > > So the simplest scripts which show the principle of operation are: > > > > ---8<--- backup ---8<--- > > #!/bin/sh > > echo "This is the archive data stream sent to stdout" > > ---8<--- > > > > ---8<--- restore ---8<--- > > #!/bin/sh > > cat > /tmp/restored_file.txt > > ---8<--- > > > > The data generated by the first script will be saved in Bacula and during > > restore this data will be forwarded to restore script which can do with > > this data whatever it wants, i.e. save to file or restore database. > > In particular, the plugin was defined in the original email like this: > > bpipe:/test/mybbdd.sql:/opt/bacula/log/mysqldump.sh > mybbdd:/opt/bacula/log/mysqldump.sh -R > > so the backup runs: > > /opt/bacula/log/mysqldump.sh mybbdd > > and the restore runs: > > /opt/bacula/log/mysqldump.sh -R > > To make it restore to a file, you either need to change what > /opt/bacula/log/mysqldump.sh does with the -R argument or use a different > restore script like in Radek's example using cat. > > __Martin > > > _______________________________________________ > Bacula-users mailing list > Bacula-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bacula-users > -- ############################# # Sistema Operativo: Debian # # Caracas, Venezuela # #############################
_______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users