On Mon, 30 May 2011 11:41:38 +0200 Jérôme Blion <jerome.bl...@free.fr> wrote:
> >> >> > > [ delete files after backup ] > >> >> > > Does exist any configuration option for that? > >> >> > > > >> >> > No. > >> >> Not yet... :) > >> > IMNSHO it allready exists, it is named 'RunAfterJob' > >> That's not true. An archive function would only delete files which > >> have been archived successfully. > >> Performing an "simple" rm will not provide the same feature. As it > >> will delete any file. > > I don't see a real problem statement here: a job backs up a set of > > files defined by a specific fileset, and if the said job completes > > without errors, you're safe to `rm' every file referred to by that > > fileset. [...] > If a file to archive has been created after the files list creation, > you will remove it without archiving it. Well, isn't it just about not using `rm *' or whatever? To present a real example: among other things, I'm using Bacula to back up an ever-growing set of voice conversation records created by the call-center software we're using. The job of archiving freshly created records is performed once a day and it goes like this: 1) A "run before job" script uses `find' to create a list of files to archive--the list is just a plain text file with one filename per line. 2) The fileset resource for the job uses the "<" notation to include the filelist created on step (1). The name of the filelist is fixed so this works just OK. 3) A "run after job" uses the filelist to move the files just archived to another location on a filesystem. Note that I could as well run something like `cat $filelist | xargs -n 100 rm -f` on the filelist instead of rsync'ing the files using it. Then in my case the filelist is renamed to include the job's unique ID and moved to a special directory, but in a simpler case I could just remove it. ------------------------------------------------------------------------------ vRanger cuts backup time in half-while increasing security. With the market-leading solution for virtual backup and recovery, you get blazing-fast, flexible, and affordable data protection. Download your free trial now. http://p.sf.net/sfu/quest-d2dcopy1 _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users