Hello there,
I'm currently trying to build a backup procedure that will backup my servers to
an external disk, then copy the backups to my iMac, so that I have another copy
of the data, if my main server were to die, along with the external backup HDD.
I only want to keep the copied volumes for a week - they are not for archival
purposes - just so that I have a another copy on my network of the most recent
data, intended to be used in a DR situation.
So far, I have setup successful backups to the external backup HDD for my
servers, which have been running for some time now, with no issues. However the
copy part of the process has been causing some grief...
Here's an example of my problem:
I have a few full backups of my SVN repositories in the following volumes:
*list media pool=SVN_Full
+---------+---------------+-----------+---------+---------------+----------+--------------+---------+------+-----------+-----------+---------------------+
| MediaId | VolumeName | VolStatus | Enabled | VolBytes | VolFiles |
VolRetention | Recycle | Slot | InChanger | MediaType | LastWritten |
+---------+---------------+-----------+---------+---------------+----------+--------------+---------+------+-----------+-----------+---------------------+
| 6 | SVN_Full_0006 | Full | 1 | 1,073,731,363 | 0 |
2,419,200 | 1 | 0 | 0 | File | 2011-12-26 00:39:18 |
| 240 | SVN_Full_0240 | Full | 1 | 1,073,716,492 | 0 |
2,419,200 | 1 | 0 | 0 | File | 2012-01-02 00:44:06 |
| 248 | SVN_Full_0248 | Full | 1 | 1,073,684,091 | 0 |
2,419,200 | 1 | 0 | 0 | File | 2012-01-09 00:41:43 |
| 254 | SVN_Full_0254 | Append | 1 | 70,929,259 | 0 |
2,419,200 | 1 | 0 | 0 | File | 2012-01-09 00:41:50 |
+---------+---------------+-----------+---------+---------------+----------+--------------+---------+------+-----------+-----------+---------------------+
I have a copy job as follows:
Job {
Name = "SVN Repositories Full Copy"
JobDefs = DefaultCopy
Type = Copy
Client = FileServer1-fd
FileSet = "SVN Repositories"
Pool = SVN_Full
Messages = Standard
Selection Type = SQLQuery
Selection Pattern = "SELECT DISTINCT Job.JobId,Job.StartTime FROM Job,Pool
WHERE Pool.Name = 'SVN_Full'
AND Pool.PoolId = Job.PoolId
AND Job.Type = 'B'
AND Job.JobStatus = 'T'
AND Job.JobId
NOT IN (SELECT PriorJobId FROM Job WHERE TYPE = 'C' AND Job.JobStatus =
'T' AND PriorJobId != 0) ORDER BY Job.StartTime;"
Schedule = "SVN Weekly Schedule"
Enabled = No
}
Then I run the copy job manually to copy all my SVN Full backups to my iMac:
*run job="SVN Repositories Full Copy" yes > http://pastebin.com/Rhdsf1sJ
So, you can see I get:
14-Jan 22:41 FileServer1-dir JobId 3340: The following 4 JobIds were chosen to
be copied: 2962,3013,3076,3148
"The following jobs will be copied: 2962,3013,3076,3148 - Ok, we have selected
four full backups in the SVN_Full pool which have not been copied before, which
will be copied in this job."
"All appears to be well"...
However [here's the problem], I then want to check to see what happens next
time this copy job runs, so to simulate things I ran the selection query
against my DB (I am expecting to see no jobs be returned for the query, as I
have already copied the jobs to my iMac):
SELECT DISTINCT Job.JobId,Job.StartTime FROM Job,Pool
WHERE Pool.Name = 'SVN_Full'
AND Pool.PoolId = Job.PoolId
AND Job.Type = 'B'
AND Job.JobStatus = 'T'
AND Job.JobId NOT IN (SELECT PriorJobId FROM Job WHERE TYPE = 'C' AND
Job.JobStatus = 'T' AND PriorJobId != 0) ORDER BY Job.StartTime;
But the following is returned from the DB:
JobId StartTime
2962 2011-12-12 00:42:17
3013 2011-12-19 00:35:55
3076 2011-12-26 00:38:17
These jobs were copied before, were they not??
"Ok, let's give it a go anyway":
*run job="SVN Repositories Full Copy" yes > http://pastebin.com/tXD7nd7J
So, we get jobs: 2962,3013,3076 copied again...
If I then run the same SQL query as above again, I get the first job (which was
already copied above) returned:
JobId StartTime
3148 2012-01-02 00:42:18
If I run: "run job="SVN Repositories Full Copy" yes" again, (as the query
result showed us) it copies job 3148 again... > http://pastebin.com/fY6bSAmL
If I then run the same SQL query as above again, I get the other three jobs
returned again:
JobId StartTime
2962 2011-12-12 00:42:17
3013 2011-12-19 00:35:55
3076 2011-12-26 00:38:17
Then we go round an round in circles... :-(
Here's my other configs that may be of use:
JobDefs {
Name = DefaultCopy
Type = Copy
Level = Full
Client = FileServer1-fd
Messages = On_Error
Selection Type = Job
}
Storage {
Name = SVN_Full_Copy
Password = <snip>
Address = FileServer1
SDPort = 9103
Device = SVN_Full_Copy
Media Type = File
Maximum Concurrent Jobs = 20
}
Pool {
Name = "SVN_Full_Copy"
Pool Type = *Copy
Volume Retention = 1 weeks
Recycle = yes
AutoPrune = yes
LabelFormat = SVN_Full_Copy_
Maximum Volume Bytes = 1G
Storage = "SVN_Full_Copy"
}
Does anyone know why my copy routine is going round in circles?? I sure the
problem will be a mistake on my part, but I can't for the life of me pinpoint
why it's happening! If any further info is needed, please let me know.
Please help if you can!
Kind regards,
Joe Nyland
------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users