mirror of
https://github.com/garethgeorge/backrest.git
synced 2025-12-12 16:55:39 +00:00
fix: make instance ID required field
This commit is contained in:
@@ -15,8 +15,9 @@ import (
|
||||
var NeverScheduledTask = ScheduledTask{}
|
||||
|
||||
const (
|
||||
PlanForUnassociatedOperations = "_unassociated_"
|
||||
PlanForSystemTasks = "_system_" // plan for system tasks e.g. garbage collection, prune, stats, etc.
|
||||
PlanForUnassociatedOperations = "_unassociated_"
|
||||
InstanceIDForUnassociatedOperations = "_unassociated_"
|
||||
PlanForSystemTasks = "_system_" // plan for system tasks e.g. garbage collection, prune, stats, etc.
|
||||
|
||||
TaskPriorityStats = 0
|
||||
TaskPriorityDefault = 1 << 1 // default priority
|
||||
|
||||
@@ -191,7 +191,11 @@ func planForSnapshot(snapshot *v1.ResticSnapshot) string {
|
||||
}
|
||||
|
||||
func instanceIDForSnapshot(snapshot *v1.ResticSnapshot) string {
|
||||
return repo.InstanceIDFromTags(snapshot.Tags)
|
||||
id := repo.InstanceIDFromTags(snapshot.Tags)
|
||||
if id != "" {
|
||||
return id
|
||||
}
|
||||
return InstanceIDForUnassociatedOperations
|
||||
}
|
||||
|
||||
// tryMigrate checks if the snapshots use the latest backrest tag set and migrates them if necessary.
|
||||
|
||||
Reference in New Issue
Block a user