+
+Document:
+- Document cleaning up the spool files:
+ db, pid, state, bsr, mail, conmsg, spool
+- Document the multiple-drive-changer.txt script.
+- Pruning with Admin job.
+- Does WildFile match against full name? Doc.
+- %d and %v only valid on Director, not for ClientRunBefore/After.
+
+Priority:
+
+For 1.39:
+- Fix re-read of last block to check if job has actually written
+ a block, and check if block was written by a different job
+ (i.e. multiple simultaneous jobs writing).
+- JobStatus and Termination codes.
+- Some users claim that they must do two prune commands to get a
+ Volume marked as purged.
+- Print warning message if LANG environment variable does not specify
+ UTF-8.
+=== Migration from David ===
+What I'd like to see:
+
+Job {
+ Name = "<poolname>-migrate"
+ Type = Migrate
+ Messages = Standard
+ Pool = Default
+ Migration Selection Type = LowestUtil | OldestVol | PoolOccupancy |
+Client | PoolResidence | Volume | JobName | SQLquery
+ Migration Selection Pattern = "regexp"
+ Next Pool = <override>
+}
+
+There should be no need for a Level (migration is always Full, since you
+don't calculate differential/incremental differences for migration),
+Storage should be determined by the volume types in the pool, and Client
+is really a selection issue. Migration should always occur to the
+NextPool defined in the pool definition. If no nextpool is defined, the
+job should end with a reason of "no place to go". If Next Pool statement
+is present, we override the check in the pool definition and use the
+pool specified.
+
+Here's how I'd define Migration Selection Types:
+
+With Regexes:
+Client -- Migrate data from selected client only. Migration Selection
+Pattern regexp provides pattern to select client names, eg ^FS00* makes
+all client names starting with FS00 eligible for migration.
+
+Jobname -- Migration all jobs matching name. Migration Selection Pattern
+regexp provides pattern to select jobnames existing in pool.
+
+Volume -- Migrate all data on specified volumes. Migration Selection
+Pattern regexp provides selection criteria for volumes to be migrated.
+Volumes must exist in pool to be eligible for migration.
+
+
+With Regex optional:
+LowestUtil -- Identify the volume in the pool with the least data on it
+and empty it. No Migration Selection Pattern required.
+
+OldestVol -- Identify the LRU volume with data written, and empty it. No
+Migration Selection Pattern required.
+
+PoolOccupancy -- if pool occupancy exceeds <highmig>, migrate volumes
+(starting with most full volumes) until pool occupancy drops below
+<lowmig>. Pool highmig and lowmig values are in pool definition, no
+Migration Selection Pattern required.
+
+
+No regex:
+SQLQuery -- Migrate all jobuids returned by the supplied SQL query.
+Migration Selection Pattern contains SQL query to execute; should return
+a list of 1 or more jobuids to migrate.
+
+PoolResidence -- Migrate data sitting in pool for longer than
+PoolResidence value in pool definition. Migration Selection Pattern
+optional; if specified, override value in pool definition (value in
+minutes).
+
+
+[ possibly a Python event -- kes ]
+===
+- run_cmd() returns int should return JobId_t
+- get_next_jobid_from_list() returns int should return JobId_t
+- Document export LDFLAGS=-L/usr/lib64
+- Don't attempt to restore from "Disabled" Volumes.
+- Network error on Win32 should set Win32 error code.
+- What happens when you rename a Disk Volume?
+- Job retention period in a Pool (and hence Volume). The job would
+ then be migrated.
+- Detect resource deadlock in Migrate when same job wants to read
+ and write the same device.
+- Make hardlink code at line 240 of find_one.c use binary search.
+- Queue warning/error messages during restore so that they
+ are reported at the end of the report rather than being
+ hidden in the file listing ...
+- Look at -D_FORTIFY_SOURCE=2
+- Add Win32 FileSet definition somewhere
+- Look at fixing restore status stats in SD.
+- Make selection of Database used in restore correspond to
+ client.
+- Implement a mode that says when a hard read error is
+ encountered, read many times (as it currently does), and if the
+ block cannot be read, skip to the next block, and try again. If
+ that fails, skip to the next file and try again, ...
+- Add level table:
+ create table LevelType (LevelType binary(1), LevelTypeLong tinyblob);
+ insert into LevelType (LevelType,LevelTypeLong) values
+ ("F","Full"),
+ ("D","Diff"),
+ ("I","Inc");
+- Add ACL to restore only to original location.
+- Add a recursive mark command (rmark) to restore.
+- "Minimum Job Interval = nnn" sets minimum interval between Jobs
+ of the same level and does not permit multiple simultaneous
+ running of that Job (i.e. lets any previous invocation finish
+ before doing Interval testing).
+- Look at simplifying File exclusions.
+- New directive "Delete purged Volumes"
+- new pool XXX with ScratchPoolId = MyScratchPool's PoolId and
+ let it fill itself, and RecyclePoolId = XXX's PoolId so I can
+ see if it become stable and I just have to supervise
+ MyScratchPool
+- If I want to remove this pool, I set RecyclePoolId = MyScratchPool's
+ PoolId, and when it is empty remove it.
+- Figure out how to recycle Scratch volumes back to the Scratch Pool.
+- Add Volume=SCRTCH
+- Allow Check Labels to be used with Bacula labels.
+- "Resuming" a failed backup (lost line for example) by using the
+ failed backup as a sort of "base" job.
+- Look at NDMP
+- Email to the user when the tape is about to need changing x
+ days before it needs changing.
+- Command to show next tape that will be used for a job even
+ if the job is not scheduled.
+- From: Arunav Mandal <amandal@trolltech.com>
+ 1. When jobs are running and bacula for some reason crashes or if I do a
+ restart it remembers and jobs it was running before it crashed or restarted
+ as of now I loose all jobs if I restart it.
+
+ 2. When spooling and in the midway if client is disconnected for instance a
+ laptop bacula completely discard the spool. It will be nice if it can write
+ that spool to tape so there will be some backups for that client if not all.
+
+ 3. We have around 150 clients machines it will be nice to have a option to
+ upgrade all the client machines bacula version automatically.
+
+ 4. Atleast one connection should be reserved for the bconsole so at heavy load
+ I should connect to the director via bconsole which at sometimes I can't
+
+ 5. Another most important feature that is missing, say at 10am I manually
+ started backup of client abc and it was a full backup since client abc has
+ no backup history and at 10.30am bacula again automatically started backup of
+ client abc as that was in the schedule. So now we have 2 multiple Full
+ backups of the same client and if we again try to start a full backup of
+ client backup abc bacula won't complain. That should be fixed.
+
+- Fix bpipe.c so that it does not modify results pointer.
+ ***FIXME*** calling sequence should be changed.
+- For Windows disaster recovery see http://unattended.sf.net/
+- regardless of the retention period, Bacula will not prune the
+ last Full, Diff, or Inc File data until a month after the
+ retention period for the last Full backup that was done.
+- update volume=xxx --- add status=Full
+- Remove old spool files on startup.
+- Exclude SD spool/working directory.
+- Refuse to prune last valid Full backup. Same goes for Catalog.
+- Python:
+ - Make a callback when Rerun failed levels is called.
+ - Give Python program access to Scheduled jobs.
+ - Add setting Volume State via Python.
+ - Python script to save with Python, not save, save with Bacula.
+ - Python script to do backup.
+ - What events?
+ - Change the Priority, Client, Storage, JobStatus (error)
+ at the start of a job.
+- Why is SpoolDirectory = /home/bacula/spool; not reported
+ as an error when writing a DVD?
+- Make bootstrap file handle multiple MediaTypes (SD)
+- Remove all old Device resource code in Dir and code to pass it
+ back in SD -- better, rework it to pass back device statistics.
+- Check locking of resources -- be sure to lock devices where previously
+ resources were locked.
+- The last part is left in the spool dir.
+
+
+- In restore don't compare byte count on a raw device -- directory
+ entry does not contain bytes.
+- To mark files as deleted, run essentially a Verify to disk, and
+ when a file is found missing (MarkId != JobId), then create
+ a new File record with FileIndex == -1. This could be done
+ by the FD at the same time as the backup.
+=== rate design
+ jcr->last_rate
+ jcr->last_runtime
+ MA = (last_MA * 3 + rate) / 4
+ rate = (bytes - last_bytes) / (runtime - last_runtime)
+- Max Vols limit in Pool off by one?
+- Implement Files/Bytes,... stats for restore job.
+- Implement Total Bytes Written, ... for restore job.
+- Despool attributes simultaneously with data in a separate
+ thread, rejoined at end of data spooling.
+- 7. Implement new Console commands to allow offlining/reserving drives,
+ and possibly manipulating the autochanger (much asked for).
+- Add start/end date editing in messages (%t %T, %e?) ...
+- Add ClientDefs similar to JobDefs.
+- Print more info when bextract -p accepts a bad block.
+- Fix FD JobType to be set before RunBeforeJob in FD.
+- Look at adding full Volume and Pool information to a Volume
+ label so that bscan can get *all* the info.
+- If the user puts "Purge Oldest Volume = yes" or "Recycle Oldest Volume = yes"
+ and there is only one volume in the pool, refuse to do it -- otherwise
+ he fills the Volume, then immediately starts reusing it.
+- Implement copies and stripes.
+- Add history file to console.
+- Each file on tape creates a JobMedia record. Peter has 4 million
+ files spread over 10000 tape files and four tapes. A restore takes
+ 16 hours to build the restore list.
+- Add and option to check if the file size changed during backup.
+- Make sure SD deletes spool files on error exit.
+- Delete old spool files when SD starts.
+- When labeling tapes, if you enter 000026, Bacula uses
+ the tape index rather than the Volume name 000026.
+- Add offline tape command to Bacula console.
+- Bug:
+ Enter MediaId or Volume name: 32
+ Enter new Volume name: DLT-20Dec04
+ Automatically selected Pool: Default
+ Connecting to Storage daemon DLTDrive at 192.168.68.104:9103 ...
+ Sending relabel command from "DLT-28Jun03" to "DLT-20Dec04" ...
+ block.c:552 Write error at 0:0 on device /dev/nst0. ERR=Bad file descriptor.
+ Error writing final EOF to tape. This tape may not be readable.
+ dev.c:1207 ioctl MTWEOF error on /dev/nst0. ERR=Permission denied.
+ askdir.c:219 NULL Volume name. This shouldn't happen!!!
+ 3912 Failed to label Volume: ERR=dev.c:1207 ioctl MTWEOF error on /dev/nst0. ERR=Permission denied.
+ Label command failed for Volume DLT-20Dec04.
+ Do not forget to mount the drive!!!
+- Bug: if a job is manually scheduled to run later, it does not appear
+ in any status report and cannot be cancelled.
+
+==== Keeping track of deleted files ====
+ My "trick" for keeping track of deletions is the following.
+ Assuming the user turns on this option, after all the files
+ have been backed up, but before the job has terminated, the
+ FD will make a pass through all the files and send their
+ names to the DIR (*exactly* the same as what a Verify job
+ currently does). This will probably be done at the same
+ time the files are being sent to the SD avoiding a second
+ pass. The DIR will then compare that to what is stored in
+ the catalog. Any files in the catalog but not in what the
+ FD sent will receive a catalog File entry that indicates
+ that at that point in time the file was deleted.
+
+ During a restore, any file initially picked up by some
+ backup (Full, ...) then subsequently having a File entry
+ marked "delete" will be removed from the tree, so will not
+ be restored. If a file with the same name is later OK it
+ will be inserted in the tree -- this already happens. All
+ will be consistent except for possible changes during the
+ running of the FD.
+
+ Since I'm on the subject, some of you may be wondering what
+ the utility of the in memory tree is if you are going to
+ restore everything (at least it comes up from time to time
+ on the list). Well, it is still *very* useful because it
+ allows only the last item found for a particular filename
+ (full path) to be entered into the tree, and thus if a file
+ is backed up 10 times, only the last copy will be restored.
+ I recently (last Friday) restored a complete directory, and
+ the Full and all the Differential and Incremental backups
+ spanned 3 Volumes. The first Volume was not even mounted
+ because all the files had been updated and hence backed up
+ since the Full backup was made. In this case, the tree
+ saved me a *lot* of time.
+
+ Make sure this information is stored on the tape too so
+ that it can be restored directly from the tape.
+
+ Comments from Martin Simmons (I think they are all covered):
+ Ok, that should cover the basics. There are few issues though:
+
+ - Restore will depend on the catalog. I think it is better to include the
+ extra data in the backup as well, so it can be seen by bscan and bextract.
+
+ - I'm not sure if it will preserve multiple hard links to the same inode. Or
+ maybe adding or removing links will cause the data to be dumped again?
+
+ - I'm not sure if it will handle renamed directories. Possibly it will work
+ by dumping the whole tree under a renamed directory?
+
+ - It remains to be seen how the backup performance of the DIR's will be
+ affected when comparing the catalog for a large filesystem.
+
+====
+From David:
+How about introducing a Type = MgmtPolicy job type? That job type would
+be responsible for scanning the Bacula environment looking for specific
+conditions, and submitting the appropriate jobs for implementing said
+policy, eg:
+
+Job {
+ Name = "Migration-Policy"
+ Type = MgmtPolicy
+ Policy Selection Job Type = Migrate
+ Scope = "<keyword> <operator> <regexp>"
+ Threshold = "<keyword> <operator> <regexp>"
+ Job Template = <template-name>
+}
+
+Where <keyword> is any legal job keyword, <operator> is a comparison
+operator (=,<,>,!=, logical operators AND/OR/NOT) and <regexp> is a
+appropriate regexp. I could see an argument for Scope and Threshold
+being SQL queries if we want to support full flexibility. The
+Migration-Policy job would then get scheduled as frequently as a site
+felt necessary (suggested default: every 15 minutes).
+
+Example:
+
+Job {
+ Name = "Migration-Policy"
+ Type = MgmtPolicy
+ Policy Selection Job Type = Migration
+ Scope = "Pool=*"
+ Threshold = "Migration Selection Type = LowestUtil"
+ Job Template = "MigrationTemplate"
+}
+
+would select all pools for examination and generate a job based on
+MigrationTemplate to automatically select the volume with the lowest
+usage and migrate it's contents to the nextpool defined for that pool.
+
+This policy abstraction would be really handy for adjusting the behavior
+of Bacula according to site-selectable criteria (one thing that pops
+into mind is Amanda's ability to automatically adjust backup levels
+depending on various criteria).
+
+
+=====
+
+Regression tests:
+- Add Pool/Storage override regression test.
+- Add delete JobId to regression.
+- Add a regression test for dbcheck.
+- New test to add bscan to four-concurrent-jobs regression,
+ i.e. after the four-concurrent jobs zap the
+ database as is done in the bscan-test, then use bscan to
+ restore the database, do a restore and compare with the
+ original.
+- Add restore of specific JobId to regression (item 3
+ on the restore prompt)
+- Add IPv6 to regression
+- Add database test to regression. Test each function like delete,
+ purge, ...
+
+- AntiVir can slow down backups on Win32 systems.
+- Win32 systems with FAT32 can be much slower than NTFS for
+ more than 1000 files per directory.
+
+
+1.37 Possibilities:
+- A HOLD command to stop all jobs from starting.
+- A PAUSE command to pause all running jobs ==> release the
+ drive.
+- Media Type = LTO,LTO-2,LTO-3
+ Media Type Read = LTO,LTO2,LTO3
+ Media Type Write = LTO2, LTO3
+
+=== From Carsten Menke <bootsy52@gmx.net>
+
+Following is a list of what I think in the situations where I'm faced with,
+could be a usefull enhancement to bacula, which I'm certain other users will
+benefit from as well.
+
+1. NextJob/NextJobs Directive within a Job Resource in the form of
+ NextJobs = job1,job2.
+
+ Why:
+ I currently solved the problem with running multiple jobs each after each
+ by setting the Max Wait Time for a job to 8 hours, and give
+ the jobs different Priorities. However, there scenarios where
+ 1 Job is directly depending on another job, so if the former job fails,
+ the job after it needn't to be run
+ while maybe other jobs should run despite of that
+
+Example:
+ A Backup Job and a Verify job, if the backup job fails there is no need to run
+ the verify job, as the backup job already failed. However, one may like
+ to backup the Catalog to disk despite of that the main backup job failed.
+
+Notes:
+ I see that this is related to the Event Handlers which are on the ToDo
+ list, also it is maybe a good idea to check for the return value and
+ execute different actions based on the return value
+
+
+3. offline capability to bconsole
+
+ Why:
+ Currently I use a script which I execute within the last Job via the
+ RunAfterJob Directive, to release and eject the tape.
+ So I have to call bconsole "release=Storage-Name" and afterwards
+ mt -f /dev/nst0 eject to get the tape out.
+
+ If I have multiple Storage Devices, than these may not be /dev/nst0 and
+ I have to modify the script or call it with parameters etc.
+ This would actually not be needed, as everything is already defined
+ in bacula-sd.conf and if I can invoke bconsole with the
+ storage name via $1 in the script than I'm done and information is
+ not duplicated.
+
+4. %s for Storage Name added to the chars being substituted in "RunAfterJob"
+
+ Why:
+
+ For the reason mentioned in 3. to have the ability to call a
+ script with /scripts/foobar %s and in the script use $1
+ to pass the Storage Name to bconsole
+
+5. Setting Volume State within a Job Resource
+
+ Why:
+ Instead of using "Maximum Volume Jobs" in the Pool Resource,
+ I would have the possibilty to define
+ in a Job Resource that after this certain job is run, the Volume State
+ should be set to "Volume State = Used", this give more flexibility (IMHO).
+
+6. Localization of Bacula Messages
+
+ Why:
+ Unfortunatley many,many people I work with don't speak english very well.
+ So if at least the Reporting messages would be localized then they
+ would understand that they have to change the tape,etc. etc.
+
+ I volunteer to do the german translations, and if I can convince my wife also
+ french and Morre (western african language).
+
+7. OK, this is evil, probably bound to security risks and maybe not possible
+ due to the design of bacula.
+
+ Implementation of Backtics ( `command` ) for shell comand execution to
+ the "Label Format" Directive.
+
+Why:
+
+ Currently I have defined BACULA_DAY_OF_WEEK="day1|day2..." resulting in
+ Label Format = "HolyBackup-${BACULA_DAY_OF_WEEK[${WeekDay}]}". If I could
+ use backticks than I could use "Label Format = HolyBackup-`date +%A` to have
+ the localized name for the day of the week appended to the
+ format string. Then I have the tape labeled automatically with weekday
+ name in the correct language.
+==========
+- Yes, that is surely the case. I probably should turn those into Warning
+ errors. In addition, you just made me think that it might not be bad to
+ add an option to check the file size after backing up the file and
+ report if it changes. This would be done as an option because it would
+ add extra overhead.
+
+ Kern, good idea. If you do do that, mention in the output: file
+ shrunk, or file expanded, just to make it obvious to the user
+ (without having to the refer to file size), just how the file size
+ changed.
+
+ Would this option be for all file, or just one file? Or a fileset?
+- Make output from status use html table tags for nicely
+ presenting in a browser.
+- Can one write tapes faster with 8192 byte block sizes?
+- Document security problems with the same password for everyone in
+ rpm and Win32 releases.
+- Browse generations of files.
+- I've seen an error when my catalog's File table fills up. I
+ then have to recreate the File table with a larger maximum row
+ size. Relevant information is at
+ http://dev.mysql.com/doc/mysql/en/Full_table.html ; I think the
+ "Installing and Configuring MySQL" chapter should talk a bit
+ about this potential problem, and recommend a solution.
+- For Solaris must use POSIX awk.
+- Want speed of writing to tape while despooling.
+- Supported autochanger:
+OS: Linux
+Man.: HP
+Media: LTO-2
+Model: SSL1016
+Slots: 16
+Cap: 200GB
+- Supported drive:
+ Wangtek 6525ES (SCSI-1 QIC drive, 525MB), under Linux 2.4.something,
+ bacula 1.36.0/1 works with blocksize 16k INSIDE bacula-sd.conf.
+- Add regex from http://www.pcre.org to Bacula for Win32.
+- Use only shell tools no make in CDROM package.
+- Include within include does it work?
+- Implement a Pool of type Cleaning?
+- Implement VolReadTime and VolWriteTime in SD
+- Modify Backing up Your Database to include a bootstrap file.
+- Think about making certain database errors fatal.
+- Look at correcting the time jump in the scheduler for daylight
+ savings time changes.
+- Add a "real" timer to network connections.
+- Promote to Full = Time period
+- Check dates entered by user for correctness (month/day/... ranges)
+- Compress restore Volume listing by date and first file.