mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-05 21:14:56 +00:00
remove calls to restic check before/after prune (#1794)
* remove calls to restic check before/after prune Signed-off-by: Steve Kriss <krisss@vmware.com> * changelog Signed-off-by: Steve Kriss <krisss@vmware.com>
This commit is contained in:
committed by
Adnan Abdulhussein
parent
3a0c1be7f0
commit
686f41ebec
@@ -91,13 +91,6 @@ func SnapshotsCommand(repoIdentifier string) *Command {
|
||||
}
|
||||
}
|
||||
|
||||
func CheckCommand(repoIdentifier string) *Command {
|
||||
return &Command{
|
||||
Command: "check",
|
||||
RepoIdentifier: repoIdentifier,
|
||||
}
|
||||
}
|
||||
|
||||
func PruneCommand(repoIdentifier string) *Command {
|
||||
return &Command{
|
||||
Command: "prune",
|
||||
|
||||
@@ -103,13 +103,6 @@ func TestSnapshotsCommand(t *testing.T) {
|
||||
assert.Equal(t, "repo-id", c.RepoIdentifier)
|
||||
}
|
||||
|
||||
func TestCheckCommand(t *testing.T) {
|
||||
c := CheckCommand("repo-id")
|
||||
|
||||
assert.Equal(t, "check", c.Command)
|
||||
assert.Equal(t, "repo-id", c.RepoIdentifier)
|
||||
}
|
||||
|
||||
func TestPruneCommand(t *testing.T) {
|
||||
c := PruneCommand("repo-id")
|
||||
|
||||
|
||||
@@ -49,9 +49,6 @@ type RepositoryManager interface {
|
||||
// authenticated to.
|
||||
ConnectToRepo(repo *velerov1api.ResticRepository) error
|
||||
|
||||
// CheckRepo checks the specified repo for errors.
|
||||
CheckRepo(repo *velerov1api.ResticRepository) error
|
||||
|
||||
// PruneRepo deletes unused data from a repo.
|
||||
PruneRepo(repo *velerov1api.ResticRepository) error
|
||||
|
||||
@@ -200,14 +197,6 @@ func (rm *repositoryManager) ConnectToRepo(repo *velerov1api.ResticRepository) e
|
||||
return rm.exec(snapshotsCmd, repo.Spec.BackupStorageLocation)
|
||||
}
|
||||
|
||||
func (rm *repositoryManager) CheckRepo(repo *velerov1api.ResticRepository) error {
|
||||
// restic check requires an exclusive lock
|
||||
rm.repoLocker.LockExclusive(repo.Name)
|
||||
defer rm.repoLocker.UnlockExclusive(repo.Name)
|
||||
|
||||
return rm.exec(CheckCommand(repo.Spec.ResticIdentifier), repo.Spec.BackupStorageLocation)
|
||||
}
|
||||
|
||||
func (rm *repositoryManager) PruneRepo(repo *velerov1api.ResticRepository) error {
|
||||
// restic prune requires an exclusive lock
|
||||
rm.repoLocker.LockExclusive(repo.Name)
|
||||
|
||||
Reference in New Issue
Block a user