/*
Bacula® - The Network Backup Solution
- Copyright (C) 2001-2006 Free Software Foundation Europe e.V.
+ Copyright (C) 2001-2014 Free Software Foundation Europe e.V.
- The main author of Bacula is Kern Sibbald, with contributions from
- many others, a complete list can be found in the file AUTHORS.
- This program is Free Software; you can redistribute it and/or
- modify it under the terms of version three of the GNU Affero General Public
- License as published by the Free Software Foundation and included
- in the file LICENSE.
+ The main author of Bacula is Kern Sibbald, with contributions from many
+ others, a complete list can be found in the file AUTHORS.
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
+ You may use this file and others of this release according to the
+ license defined in the LICENSE file, which includes the Affero General
+ Public License, v3.0 ("AGPLv3") and some additional permissions and
+ terms pursuant to its AGPLv3 Section 7.
Bacula® is a registered trademark of Kern Sibbald.
- The licensor of Bacula is the Free Software Foundation Europe
- (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
- Switzerland, email:ftf@fsfeurope.org.
*/
/*
to create datafile
-
+
for i in $(seq 10000 99999) ; do
j=$((($i % 1000) + 555))
echo "$i;/tmp/totabofds$j/fiddddle${j}$i;xxxLSTATxxxx;xxxxxxxMD5xxxxxx"
done > dat1
-
+
or
j=0
#include "findlib/find.h"
#include "cats/cats.h"
#include "cats/sql_glue.h"
-
+
/* Forward referenced functions */
static void *do_batch(void *);
textdomain("bacula");
init_stack_dump();
lmgr_init_thread();
-
+
char **files = (char **) malloc (10 * sizeof(char *));
int i;
my_name_is(argc, argv, "bbatch");
uint64_t nb_file=0;
btime_t start, end;
/* To use the -r option, the catalog should already contains records */
-
+
if ((db = db_init_database(NULL, NULL, db_name, db_user, db_password,
db_host, 0, NULL, false, disable_batch)) == NULL) {
Emsg0(M_ERROR_TERM, 0, _("Could not init Bacula database\n"));
db_get_file_list(NULL, db, restore_list, false, false, list_handler, &nb_file);
end = get_current_btime();
- Pmsg3(0, _("Computing file list for jobid=%s files=%lld secs=%d\n"),
+ Pmsg3(0, _("Computing file list for jobid=%s files=%lld secs=%d\n"),
restore_list, nb_file, (uint32_t)btime_to_unix(end-start));
-
+
free(restore_list);
return 0;
}
pm_strcpy(bjcr->fileset_name, "Dummy.fileset.name");
bjcr->fileset_md5 = get_pool_memory(PM_FNAME);
pm_strcpy(bjcr->fileset_md5, "Dummy.fileset.md5");
-
+
if ((db = db_init_database(NULL, NULL, db_name, db_user, db_password,
db_host, 0, NULL, false, false)) == NULL) {
Emsg0(M_ERROR_TERM, 0, _("Could not init Bacula database\n"));
if (verbose) {
Pmsg2(000, _("Using Database: %s, User: %s\n"), db_name, db_user);
}
-
+
bjcr->db = db;
pthread_create(&thid, NULL, do_batch, bjcr);
fclose(fd);
db_write_batch_file_records(bjcr);
btime_t end = get_current_btime();
-
+
P(mutex);
char ed1[200], ed2[200];
printf("\rbegin = %s, end = %s\n", edit_int64(begin, ed1),edit_int64(end, ed2));
printf("Insert time = %sms\n", edit_int64((end - begin) / 10000, ed1));
- printf("Create %u files at %.2f/s\n", lineno,
+ printf("Create %u files at %.2f/s\n", lineno,
(lineno / ((float)((end - begin) / 1000000))));
nb--;
V(mutex);