Recycle files on source system after completing backup

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Recycle files on source system after completing backup

c.monty
Hello!
Is there a functionality that would recycle files on the source system that have been successfully backed up?
The point here is that files that are included in a backup are not needed anymore on the source system because disk space must be released.

THX

------------------------------------------------------------------------------
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|

Re: Recycle files on source system after completing backup

Josip Deanovic
On Thursday 2016-12-01 16:18:06 [hidden email] wrote:
> Hello!
> Is there a functionality that would recycle files on the source system
> that have been successfully backed up? The point here is that files
> that are included in a backup are not needed anymore on the source
> system because disk space must be released.

Hi!

Would migration job help to solve your problem here?

You can always do some tricks with scripts using an admin job.

--
Josip Deanovic

------------------------------------------------------------------------------
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|

Re: Recycle files on source system after completing backup

Heitor Faria
In reply to this post by c.monty

> Hello!

Hello, THX,

> Is there a functionality that would recycle files on the source system that have
> been successfully backed up?

I don't think so, but it can be easily solved by a creative workaround ClientRunAfterJob script. If you must know, dynamically, what files need to be deleted, also bconsole installed at the client side and the script run at a 2nd different backup job for this same client. E.g.:

JOBID=$(echo "list jobs client=xpto-fd limit=1 order=desc"|bconsole |sed '9!d'| cut -f 2 -d "|" )  # fetches last backup JobID for the client
echo "list files jobid=$JOBID" |bconsole |cut -f 2 -d "|" | head -n -7 | tail -n +10 | rm -f       # removes the backed up files in the last JOBID

> The point here is that files that are included in a backup are not needed
> anymore on the source system because disk space must be released.
>
> THX

Regards,
--
===========================================================================
Heitor Medrado de Faria | Bacula do Brasil
• Não seja tarifado pelo tamanho dos seus backups, conheça o Bacula Enterprise: http://www.bacula.com.br/enterprise/ 
• Ministro treinamento e implementação in-company do Bacula Community: http://www.bacula.com.br/in-company/ 
(61) 98268-4220 | www.bacula.com.br
============================================================================

------------------------------------------------------------------------------
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|

Re: Recycle files on source system after completing backup

Josip Deanovic
On Thursday 2016-12-01 15:34:03 Heitor Faria wrote:

> > Hello!
>
> Hello, THX,
>
> > Is there a functionality that would recycle files on the source system
> > that have been successfully backed up?
>
> I don't think so, but it can be easily solved by a creative workaround
> ClientRunAfterJob script. If you must know, dynamically, what files
> need to be deleted, also bconsole installed at the client side and the
> script run at a 2nd different backup job for this same client. E.g.:
>
> JOBID=$(echo "list jobs client=xpto-fd limit=1 order=desc"|bconsole |sed
> '9!d'| cut -f 2 -d "|" )  # fetches last backup JobID for the client
> echo "list files jobid=$JOBID" |bconsole |cut -f 2 -d "|" | head -n -7
> | tail -n +10 | rm -f       # removes the backed up files in the last
> JOBID
> > The point here is that files that are included in a backup are not
> > needed anymore on the source system because disk space must be
> > released.
> >
> > THX


I was under impression that the term "source system" references the
the primary backup and not the backed up client.


--
Josip Deanovic

------------------------------------------------------------------------------
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users