]> git.sur5r.net Git - bacula/docs/blob - docs/manual/migration.tex
Updates
[bacula/docs] / docs / manual / migration.tex
1
2 \section*{Migration}
3 \label{_MigrationChapter}
4 \index[general]{Migration} 
5 \addcontentsline{toc}{section}{Migration}
6
7 The term Migration as used in the context of Bacula means moving data from one
8 Volume to another, and in particular it is
9 a Job (similar to a backup job) that reads data that was previously
10 backed up to a Volume and writes it to another Volume purging the 
11 catalog records associated with the first backup job.  In other words,
12 Migration moves Bacula Job data from one Volume to another. Although we 
13 mention Volumes, in reality, Migration is based on moving individual Jobs from
14 one Pool to another. 
15
16 Migrations can be based on quite a number of different criteria such as:
17 a single previous Job; a Volume; a Client; a regular expression matching
18 a Job, Volume, or Client name; the time a Job is on a Volume; high 
19 and low water marks (usage or occupation) of a Pool; Volume size, ...
20 The details of these selection criteria will be defined below.
21
22
23 To run a Migration job, you must have defined a Job resource very similar
24 to a Backup Job but with {\bf Type = Migrate} instead of {\bf Type =
25 Backup}.  The migration job then starts much like a backup job starts and 
26 searches for a previous backup Job or Jobs that matches the parameters you have
27 specified in the migration Job resource (detailed a bit later). Then
28 for each previous backup Job found, the Migration Job will run a new
29 Job which copies the old Job data from the previous Volume to a new
30 Volume defined in the Migration Pool. It is possible that no prior
31 Jobs are found for migration, in which case, the Migration job will
32 simply terminate having done nothing, but normally at a minimum, three jobs 
33 are involved during a migration:
34
35 \begin{itemize}
36 \item The currently running Migration Job
37 \item The previous Backup Job
38 \item A new Backup Job that writes the previous data to
39       the new Volume.
40 \end{itemize}
41
42 If the Migration is for a particular Volume, multiple new Backup Jobs
43 may be started, one for each Job on the Volume.
44
45
46
47 \subsection*{Migration Job Resource Directives}
48 \addcontentsline{toc}{section}{Migration Job Resource Directives}
49
50 The following directives can appear in a Director's Job resource, and they
51 are used to define a Migration job.          
52
53 \begin{description}
54 \item [Type = Migrate]
55 This defines the job that is run as being a Migration Job.
56 Migration Jobs do not have any Files associated with them, and in
57 that sense they are more or less like an Admin job. They just
58 check to see if there is anything to Migrate then possibly start
59 and control new Backup jobs to move the data.  
60  
61 \item [Selection Type = \lt{}Selection-type-keyword\gt{}]  
62   Where \lt{}Selection-type-keyword\gt{} can be:
63   \begin{description}
64   \item [SmallestVolume] This selection keyword selects the smallest volume in
65         the Pool to be migrated.
66   \item [OldestVolume] This selection keyword selects the oldest volume in
67         the Pool to be migrated.
68   \item [Client]
69   \item [Volume]
70   \item [Job]
71   \item [SQLQuery]
72   \item [PoolOccupancy] Not yet implemented.
73   \item [PoolTime] Not yet implemented.
74   \end{description}
75 \end{description}
76
77
78 \item [Selection Pattern = \lt{}Quoted-string\gt{}]
79 The Selection Patterns permitted for each Selection-type-keyword
80 are described above.
81
82 \end{description}
83
84 \subsection*{Migration Pool Resource Directives}
85 \addcontentsline{toc}{section}{Migration Pool Resource Directives}
86
87 The following directives can appear in a Director's Pool resource, and they
88 are used to define a Migration job.          
89
90 \begin{description}
91 \item [Migration Time = \lt{}time-specification\gt{}]
92 If a PoolTime migration is done, the time specified here in seconds (time
93 modifiers are permitted -- e.g. hours, ...) will be used. If the     
94 previous Backup Job or Jobs selected have been in the Pool longer than
95 the specified PoolTime, then they will be migrated.
96  
97 \item [Migration High Bytes =  \lt{}byte-specification\gt{}]
98
99 \item [Migration Low Bytes = \lt{}byte-specification\gt{}]
100
101 \item [Next Pool = \lt{}pool-specification\gt{}]
102
103 \item [Storage = \lt{}storage-specification\gt{}]
104
105 \end{description}