Bacula-users

Re: [Bacula-users] remove source files

2013-01-29 02:39:15
Subject: Re: [Bacula-users] remove source files
From: Geert Stappers <Geert.Stappers AT vanadgroup DOT com>
To: "bacula-users AT lists.sourceforge DOT net" <bacula-users AT lists.sourceforge DOT net>
Date: Tue, 29 Jan 2013 08:36:34 +0100
Op 20130128 om 17:51 schreef exeral:
> 
> I would like to do something similar to rsync --remove-source-files option 
> with bacula.

So delete what was backuped ...


> Let's say à Job with
> Client Run Before Job = <a script which dump some databases to /destination >
> when the job is finished
> with Client run after job = <a script which delete all the dumps that were 
> created and backed up successfully>
> 
> I could just run after job rm -rf /destination/* but it's safer to delete an 
> explicit list of files processed in Job.
> 
> is there any solution to get the file list of files that were processed in 
> job.
> 
> %F = Job Files is only the number of files :(


There %i, Job Id. Say it has value 1337, you can do


        echo list files JobId=1337 | /etc/bacula/scripts/bconsole  | sed -e 
's/^| //' -e 's/ *|$//'



Cheers
Geert Stappers
-- 
http://www.vanadcimplicity.com/
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>