\footnotesize
\begin{verbatim}
- mysqldump -f -t -n >bacula-backup.dmp
-
+mysqldump -t -n -c --compatible=postgresql --skip-quote-names --skip-opt \
+ --disable-keys --lock-tables -u bacula -ppassword bacula \
+ | grep -v "INSERT INTO Status" \
+ | sed -e 's/0000-00-00 00:00:00/1970-01-01 00:00:00/g' \
+ | sed -e 's/\\0//' > bacula-backup.sql
\end{verbatim}
\normalsize
\begin{verbatim}
psql -Ubacula bacula
-SELECT SETVAL('basefiles_baseid_seq', (SELECT
-MAX(baseid) FROM basefiles));
-SELECT SETVAL('client_clientid_seq', (SELECT
-MAX(clientid) FROM client));
-SELECT SETVAL('file_fileid_seq', (SELECT MAX(fileid)
-FROM file));
-SELECT SETVAL('filename_filenameid_seq', (SELECT
-MAX(filenameid) FROM filename));
-
-SELECT SETVAL('fileset_filesetid_seq', (SELECT
-MAX(filesetid) FROM fileset));
-
+SELECT SETVAL('basefiles_baseid_seq', (SELECT MAX(baseid) FROM basefiles));
+SELECT SETVAL('client_clientid_seq', (SELECT MAX(clientid) FROM client));
+SELECT SETVAL('file_fileid_seq', (SELECT MAX(fileid) FROM file));
+SELECT SETVAL('filename_filenameid_seq', (SELECT MAX(filenameid) FROM filename));
+SELECT SETVAL('fileset_filesetid_seq', (SELECT MAX(filesetid) FROM fileset));
SELECT SETVAL('job_jobid_seq', (SELECT MAX(jobid) FROM job));
-SELECT SETVAL('jobmedia_jobmediaid_seq', (SELECT
-MAX(jobmediaid) FROM jobmedia));
+SELECT SETVAL('jobmedia_jobmediaid_seq', (SELECT MAX(jobmediaid) FROM jobmedia));
+SELECT SETVAL('media_mediaid_seq', (SELECT MAX(mediaid) FROM media));
+SELECT SETVAL('path_pathid_seq', (SELECT MAX(pathid) FROM path));
+SELECT SETVAL('basefiles_baseid_seq', (SELECT MAX(baseid) FROM basefiles));
+SELECT SETVAL('client_clientid_seq', (SELECT MAX(clientid) FROM client));
+SELECT SETVAL('file_fileid_seq', (SELECT MAX(fileid) FROM file));
+SELECT SETVAL('filename_filenameid_seq', (SELECT MAX(filenameid) FROM filename));
+SELECT SETVAL('fileset_filesetid_seq', (SELECT MAX(filesetid) FROM fileset));
+SELECT SETVAL('job_jobid_seq', (SELECT MAX(jobid) FROM job));
+SELECT SETVAL('jobmedia_jobmediaid_seq', (SELECT MAX(jobmediaid) FROM jobmedia));
SELECT SETVAL('media_mediaid_seq', (SELECT MAX(mediaid) FROM media));
SELECT SETVAL('path_pathid_seq', (SELECT MAX(pathid) FROM path));
-
SELECT SETVAL('pool_poolid_seq', (SELECT MAX(poolid) FROM pool));
-
+
+SELECT SETVAL('device_deviceid_seq', (SELECT MAX(deviceid) FROM device));
+SELECT SETVAL('location_locationid_seq', (SELECT MAX(locationid) FROM location));
+SELECT SETVAL('locationlog_loclogid_seq', (SELECT MAX(loclogid) FROM locationlog));
+SELECT SETVAL('log_logid_seq', (SELECT MAX(logid) FROM log));
+SELECT SETVAL('mediatype_mediatypeid_seq', (SELECT MAX(mediatypeid) FROM mediatype));
+SELECT SETVAL('storage_storageid_seq', (SELECT MAX(storageid) FROM storage));
\end{verbatim}
\normalsize