1 This patch change the FileId type from 32 to 64 bits. The 2.4.x (and previous) default type
2 don't permit to backup more than 2^32 files. (~ 4,000,000,000 files)
4 You will have to upgrade the catalog. It will take x2 space, so be sure to check your available
8 patch -p0 < patches/testing/fileid64.patch
9 ./configure <your options>
14 ./src/cats/update_bacula_tables
16 Index: src/cats/update_postgresql_tables.in
17 ===================================================================
18 --- src/cats/update_postgresql_tables.in (révision 7513)
19 +++ src/cats/update_postgresql_tables.in (copie de travail)
21 if $bindir/psql -f - -d ${db_name} $* <<END-OF-DATA
23 -- Create a table like Job for long term statistics
25 CREATE TABLE jobstat (LIKE job);
27 +ALTER TABLE file ALTER fileid TYPE bigint ;
28 +ALTER TABLE basefiles ALTER fileid TYPE bigint;
29 UPDATE version SET versionid=11;
34 Index: src/cats/cats.h
35 ===================================================================
36 --- src/cats/cats.h (révision 7513)
37 +++ src/cats/cats.h (copie de travail)
39 * In principle, the only field that really should need to be
40 * 64 bits is the FileId_t
42 -typedef uint32_t FileId_t;
43 +typedef uint64_t FileId_t;
44 typedef uint32_t DBId_t; /* general DB id type */
45 typedef uint32_t JobId_t;
47 Index: src/cats/make_postgresql_tables.in
48 ===================================================================
49 --- src/cats/make_postgresql_tables.in (révision 7514)
50 +++ src/cats/make_postgresql_tables.in (copie de travail)
55 - fileid serial not null,
56 + fileid bigserial not null,
57 fileindex integer not null default 0,
58 jobid integer not null,
59 pathid integer not null,
62 baseid serial not null,
63 jobid integer not null,
64 - fileid integer not null,
65 + fileid bigint not null,
69 Index: src/cats/update_mysql_tables.in
70 ===================================================================
71 --- src/cats/update_mysql_tables.in (révision 7513)
72 +++ src/cats/update_mysql_tables.in (copie de travail)
75 -- Create a table like Job for long term statistics
76 CREATE TABLE JobStat (LIKE Job);
78 +ALTER TABLE File CHANGE FileId FileId BIGINT UNSIGNED NOT NULL AUTO_INCREMENT;
79 +ALTER TABLE BaseFiles CHANGE FileId FileId BIGINT UNSIGNED NOT NULL;
81 INSERT INTO Version (VersionId) VALUES (11);
83 Index: src/cats/make_mysql_tables.in
84 ===================================================================
85 --- src/cats/make_mysql_tables.in (révision 7514)
86 +++ src/cats/make_mysql_tables.in (copie de travail)
91 - FileId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
92 + FileId BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
93 FileIndex INTEGER UNSIGNED DEFAULT 0,
94 JobId INTEGER UNSIGNED NOT NULL REFERENCES Job,
95 PathId INTEGER UNSIGNED NOT NULL REFERENCES Path,
97 BaseId INTEGER UNSIGNED AUTO_INCREMENT,
98 BaseJobId INTEGER UNSIGNED NOT NULL REFERENCES Job,
99 JobId INTEGER UNSIGNED NOT NULL REFERENCES Job,
100 - FileId INTEGER UNSIGNED NOT NULL REFERENCES File,
101 + FileId BIGINT UNSIGNED NOT NULL REFERENCES File,
102 FileIndex INTEGER UNSIGNED,