On Wed, 2006-02-08 at 09:02 +0100, Arno Lehmann wrote:
> Hello,
>
> On 2/8/2006 6:54 AM, Brian A. Seklecki wrote:
> > Is there any built-in mechanism to test Schedule {} planning? I need to
> > verify the behavior will work as expected.
>
> If you trust Bacula itself, use the show job=xxx command. Part of the
> output here:
Also, here's an example of what I mean when I say "Simulation", and I
suspect the developers might have a similar testing approach, it's just
not documented/adopted.
Overall approach:
*) Use "File" or "Disk" based meta-tapes (Volumes) to save
auto-changer / manual intervention time
*) Designate your jobs to start at some even point in time in the
future.
*) Manually label your volumes; make a copy of them with just the header
written.
*) Flush the database, re-create it from scratch
*) PGDump and reload the database records of interest (media table)
*) Run the FD/SD/DIR in foreground mode with -f -d100
*) Move the clock forward in increments of 12 hours using a for [] loop
in bourne shell
---------------------
Thus, to simulate a new schedule:
1) Kill the DIR process
2) rm(1) the tape volume data files
3) sh drop_postgresql_tables ; sh drop_postgresql_database
4) cp(1)/tar(1) the original tape volume data files back into place
5) sh make_postgresql_tables ; sh grant_postgresql_privileges
6) Create the DB entries to accompany the volumes:
INSERT INTO media VALUES (1, 'CFusionDaily0', 0, 1, 'File', 0, NULL,
NULL, '2006-02-12 20:30:23', 0, 0, 0, 0, 1, 0, 0, 0, 0, 'Append', 1,
518400, 82800, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0);
INSERT INTO media VALUES (2, 'CFusionDaily1', 0, 1, 'File', 0, NULL,
NULL, '2006-02-12 20:30:23', 0, 0, 0, 0, 1, 0, 0, 0, 0, 'Append', 1,
518400, 82800, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0);
[....]
7) Set the date:
# date 200602131149.45
Sun Feb 12 21:59:45 EST 2006
8) Set the schedule for noon
9) Start the dir with -f -d100
10) Simulate status update poll'ing with:
# while true; do echo -n "status dir" | bconsole; sleep 10; done
11) Move the the time ahead in increments and test your schedule /
rotation policy
smime.p7s
Description: S/MIME cryptographic signature
