[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bacula-commits
Subject:    [Bacula-commits] SF.net SVN: bacula:[7518]
From:       ricozz () users ! sourceforge ! net
Date:       2008-08-28 13:50:23
Message-ID: E1KYhtH-00066L-Hw () d5vjzd1 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Revision: 7518
          http://bacula.svn.sourceforge.net/bacula/?rev=7518&view=rev
Author:   ricozz
Date:     2008-08-28 13:50:22 +0000 (Thu, 28 Aug 2008)

Log Message:
-----------
ebl  Add patch to use 64bit FileId field

Added Paths:
-----------
    trunk/bacula/patches/testing/fileid64.patch

Added: trunk/bacula/patches/testing/fileid64.patch
===================================================================
--- trunk/bacula/patches/testing/fileid64.patch	                        (rev 0)
+++ trunk/bacula/patches/testing/fileid64.patch	2008-08-28 13:50:22 UTC (rev 7518)
@@ -0,0 +1,104 @@
+This patch change the FileId type from 32 to 64 bits. The 2.4.x (and previous) \
default type +don't permit to backup more than 2^32 files. (~ 4,000,000,000 files)
+
+You will have to upgrade the catalog. It will take x2 space, so be sure to check \
your available +space before.
+
+  cd <bacula-source>
+  patch -p0 < patches/testing/fileid64.patch
+  ./configure <your options>
+  make
+  ...
+  make install
+
+  ./src/cats/update_bacula_tables
+
+Index: src/cats/update_postgresql_tables.in
+===================================================================
+--- src/cats/update_postgresql_tables.in	(révision 7513)
++++ src/cats/update_postgresql_tables.in	(copie de travail)
+@@ -12,9 +12,12 @@
+ if $bindir/psql -f - -d ${db_name} $* <<END-OF-DATA
+ 
+ -- Create a table like Job for long term statistics
++BEGIN;
+ CREATE TABLE jobstat (LIKE job);
+-
++ALTER TABLE file ALTER fileid TYPE bigint ;
++ALTER TABLE basefiles ALTER fileid TYPE bigint;
+ UPDATE version SET versionid=11;
++COMMIT;
+ 
+ vacuum analyse;
+ 
+Index: src/cats/cats.h
+===================================================================
+--- src/cats/cats.h	(révision 7513)
++++ src/cats/cats.h	(copie de travail)
+@@ -747,7 +747,7 @@
+  * In principle, the only field that really should need to be
+  *  64 bits is the FileId_t
+  */
+-typedef uint32_t FileId_t;
++typedef uint64_t FileId_t;
+ typedef uint32_t DBId_t;              /* general DB id type */
+ typedef uint32_t JobId_t;
+ 
+Index: src/cats/make_postgresql_tables.in
+===================================================================
+--- src/cats/make_postgresql_tables.in	(révision 7514)
++++ src/cats/make_postgresql_tables.in	(copie de travail)
+@@ -29,7 +29,7 @@
+ 
+ CREATE TABLE file
+ (
+-    fileid	      serial	  not null,
++    fileid	      bigserial	  not null,
+     fileindex	      integer	  not null  default 0,
+     jobid	      integer	  not null,
+     pathid	      integer	  not null,
+@@ -295,7 +295,7 @@
+ (
+     baseid	      serial		    not null,
+     jobid	      integer		    not null,
+-    fileid	      integer		    not null,
++    fileid	      bigint		    not null,
+     fileindex	      integer			    ,
+     basejobid	      integer			    ,
+     primary key (baseid)
+Index: src/cats/update_mysql_tables.in
+===================================================================
+--- src/cats/update_mysql_tables.in	(révision 7513)
++++ src/cats/update_mysql_tables.in	(copie de travail)
+@@ -14,7 +14,8 @@
+ 
+ -- Create a table like Job for long term statistics
+ CREATE TABLE JobStat (LIKE Job);
+-
++ALTER TABLE File CHANGE FileId FileId BIGINT UNSIGNED NOT NULL AUTO_INCREMENT;
++ALTER TABLE BaseFiles CHANGE FileId FileId BIGINT UNSIGNED NOT NULL;
+ DELETE FROM Version;
+ INSERT INTO Version (VersionId) VALUES (11);
+ 
+Index: src/cats/make_mysql_tables.in
+===================================================================
+--- src/cats/make_mysql_tables.in	(révision 7514)
++++ src/cats/make_mysql_tables.in	(copie de travail)
+@@ -29,7 +29,7 @@
+ 
+ 
+ CREATE TABLE File (
+-   FileId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
++   FileId BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
+    FileIndex INTEGER UNSIGNED DEFAULT 0,
+    JobId INTEGER UNSIGNED NOT NULL REFERENCES Job,
+    PathId INTEGER UNSIGNED NOT NULL REFERENCES Path,
+@@ -272,7 +272,7 @@
+    BaseId INTEGER UNSIGNED AUTO_INCREMENT,
+    BaseJobId INTEGER UNSIGNED NOT NULL REFERENCES Job,
+    JobId INTEGER UNSIGNED NOT NULL REFERENCES Job,
+-   FileId INTEGER UNSIGNED NOT NULL REFERENCES File,
++   FileId BIGINT UNSIGNED NOT NULL REFERENCES File,
+    FileIndex INTEGER UNSIGNED,
+    PRIMARY KEY(BaseId)
+    );


This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bacula-commits mailing list
Bacula-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic