Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add restic wrapper library #673

Merged
merged 5 commits into from
Mar 19, 2019
Merged

Add restic wrapper library #673

merged 5 commits into from
Mar 19, 2019

Conversation

hossainemruz
Copy link
Contributor

@hossainemruz hossainemruz commented Feb 14, 2019

Requirements:

@codecov-io
Copy link

codecov-io commented Feb 14, 2019

Codecov Report

Merging #673 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #673   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           2      2           
  Lines           8      8           
=====================================
  Hits            8      8

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7b8309a...09cdd49. Read the comment docs.

diptadas
diptadas previously approved these changes Feb 25, 2019
pkg/restic/output.go Outdated Show resolved Hide resolved
pkg/restic/output.go Outdated Show resolved Hide resolved
pkg/restic/output.go Outdated Show resolved Hide resolved
pkg/restic/output.go Outdated Show resolved Hide resolved
pkg/restic/config.go Outdated Show resolved Hide resolved
pkg/restic/commands.go Outdated Show resolved Hide resolved

// return first matching rule
// if hosts is empty for any rule, it will match any hostname
func RestoreOptionsForHost(hostname string, rules []api.Rule) restic.RestoreOptions {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add test?

# Conflicts:
#	glide.lock
#	vendor/github.com/go-openapi/swag/loading.go
#	vendor/github.com/go-openapi/swag/util.go
#	vendor/github.com/go-openapi/swag/yaml.go
#	vendor/github.com/google/go-cmp/cmp/compare.go
#	vendor/github.com/google/go-cmp/cmp/options.go
#	vendor/github.com/google/go-cmp/cmp/path.go
#	vendor/github.com/google/go-cmp/cmp/reporter.go
"github.com/pkg/errors"
)

func convertToMinutesSeconds(time string) (int, int, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Find out how restic generates the output format.

return r == ' ' || r == '\t' || r == ','
}

func convertSizeToBytes(dataSize string) (float64, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tamalsaha tamalsaha merged commit 6a74602 into master Mar 19, 2019
@tamalsaha tamalsaha deleted the restic-wrapper branch March 19, 2019 05:29
tamalsaha pushed a commit that referenced this pull request Mar 20, 2019
- [x] Merge #647 
- [x] Merge #673 

**Notes**

- Implicit inputs are collected from backup/restore session, backup config and repositories. For current list see `inputs.go`.
- Inputs to tasks are carried over to functions.
- Inputs for resolving tasks: implicit inputs + backup config params
- Inputs for resolving functions: inputs to parent task + task params
- Host name: `host-0`
- `drone/envsubst` only works with alphanumeric characters and underscore as key name.
tamalsaha pushed a commit that referenced this pull request Mar 21, 2019
**Requirements:**
- [x] Merge #647 to master
- [x] Merge #673 to master
- [x] Merge #674 to master
- [x] Merge #671 to master
- [x] Rebase against master

**Tasks:**
- [x] Update Restore Logic
- [x] Update Backup Logic
- [x] Update Workload Controllers
	- [x] Deployment
	- [x] DaemonSet
	- [x] ReplicationControler
	- [x] ReplicaSet
	- [x] StatefulSet
- [x] Fix ConfigMap lock deletion and RBAC stuff deletion logic
- [x] Ensure sidecar/init-container according to new design
	- [x] Ensure Restore init-container injection
	- [x] Ensure Restore init-container deletion
	- [x] Ensure Backup sidecar injection
	- [x] Ensure Backup sidecar deletion
- [x] Add new backup command (sagor is working)
- [x] Add new restore command

- [x] Add controller (possibly in different PR)
	- [x] PersistentVolumeClaim
	- [x] AppBinding
tamalsaha pushed a commit that referenced this pull request Mar 28, 2019
**Requirements** : 
- [x]  Merge #673 to master 
- [x]  Merge #675 to master 
- [x] Merge #691
- [x] Rebase against master

**Fixed Issue** : 
- [x]  Add `BackupSession Sidecar Controller` Controller
- [x]  Controller take backup
tamalsaha pushed a commit to stashed/postgres that referenced this pull request May 23, 2019
**Requirements:**
- [x] Merge stashed/stash#647 to master
- [x] Merge stashed/stash#673 to master
- [x] Merge stashed/stash#674 to master
- [x] Merge stashed/stash#671 to master
- [x] Rebase against master

**Tasks:**
- [x] Update Restore Logic
- [x] Update Backup Logic
- [x] Update Workload Controllers
	- [x] Deployment
	- [x] DaemonSet
	- [x] ReplicationControler
	- [x] ReplicaSet
	- [x] StatefulSet
- [x] Fix ConfigMap lock deletion and RBAC stuff deletion logic
- [x] Ensure sidecar/init-container according to new design
	- [x] Ensure Restore init-container injection
	- [x] Ensure Restore init-container deletion
	- [x] Ensure Backup sidecar injection
	- [x] Ensure Backup sidecar deletion
- [x] Add new backup command (sagor is working)
- [x] Add new restore command

- [x] Add controller (possibly in different PR)
	- [x] PersistentVolumeClaim
	- [x] AppBinding
tamalsaha pushed a commit to stashed/postgres that referenced this pull request May 23, 2019
**Requirements** : 
- [x]  Merge stashed/stash#673 to master 
- [x]  Merge stashed/stash#675 to master 
- [x] Merge stashed/stash#691
- [x] Rebase against master

**Fixed Issue** : 
- [x]  Add `BackupSession Sidecar Controller` Controller
- [x]  Controller take backup
tamalsaha pushed a commit to stashed/docs that referenced this pull request May 25, 2019
**Requirements:**
- [x] Merge stashed/stash#647 to master
- [x] Merge stashed/stash#673 to master
- [x] Merge stashed/stash#674 to master
- [x] Merge stashed/stash#671 to master
- [x] Rebase against master

**Tasks:**
- [x] Update Restore Logic
- [x] Update Backup Logic
- [x] Update Workload Controllers
	- [x] Deployment
	- [x] DaemonSet
	- [x] ReplicationControler
	- [x] ReplicaSet
	- [x] StatefulSet
- [x] Fix ConfigMap lock deletion and RBAC stuff deletion logic
- [x] Ensure sidecar/init-container according to new design
	- [x] Ensure Restore init-container injection
	- [x] Ensure Restore init-container deletion
	- [x] Ensure Backup sidecar injection
	- [x] Ensure Backup sidecar deletion
- [x] Add new backup command (sagor is working)
- [x] Add new restore command

- [x] Add controller (possibly in different PR)
	- [x] PersistentVolumeClaim
	- [x] AppBinding
tamalsaha pushed a commit to stashed/docs that referenced this pull request May 25, 2019
**Requirements** : 
- [x]  Merge stashed/stash#673 to master 
- [x]  Merge stashed/stash#675 to master 
- [x] Merge stashed/stash#691
- [x] Rebase against master

**Fixed Issue** : 
- [x]  Add `BackupSession Sidecar Controller` Controller
- [x]  Controller take backup
tamalsaha pushed a commit to stashed/installer that referenced this pull request May 25, 2019
**Requirements:**
- [x] Merge stashed/stash#647 to master
- [x] Merge stashed/stash#673 to master
- [x] Merge stashed/stash#674 to master
- [x] Merge stashed/stash#671 to master
- [x] Rebase against master

**Tasks:**
- [x] Update Restore Logic
- [x] Update Backup Logic
- [x] Update Workload Controllers
	- [x] Deployment
	- [x] DaemonSet
	- [x] ReplicationControler
	- [x] ReplicaSet
	- [x] StatefulSet
- [x] Fix ConfigMap lock deletion and RBAC stuff deletion logic
- [x] Ensure sidecar/init-container according to new design
	- [x] Ensure Restore init-container injection
	- [x] Ensure Restore init-container deletion
	- [x] Ensure Backup sidecar injection
	- [x] Ensure Backup sidecar deletion
- [x] Add new backup command (sagor is working)
- [x] Add new restore command

- [x] Add controller (possibly in different PR)
	- [x] PersistentVolumeClaim
	- [x] AppBinding
tamalsaha pushed a commit to stashed/installer that referenced this pull request May 25, 2019
**Requirements:**
- [x] Merge stashed/stash#647 to master
- [x] Merge stashed/stash#673 to master
- [x] Merge stashed/stash#674 to master
- [x] Merge stashed/stash#671 to master
- [x] Rebase against master

**Tasks:**
- [x] Update Restore Logic
- [x] Update Backup Logic
- [x] Update Workload Controllers
	- [x] Deployment
	- [x] DaemonSet
	- [x] ReplicationControler
	- [x] ReplicaSet
	- [x] StatefulSet
- [x] Fix ConfigMap lock deletion and RBAC stuff deletion logic
- [x] Ensure sidecar/init-container according to new design
	- [x] Ensure Restore init-container injection
	- [x] Ensure Restore init-container deletion
	- [x] Ensure Backup sidecar injection
	- [x] Ensure Backup sidecar deletion
- [x] Add new backup command (sagor is working)
- [x] Add new restore command

- [x] Add controller (possibly in different PR)
	- [x] PersistentVolumeClaim
	- [x] AppBinding
tamalsaha pushed a commit to stashed/installer that referenced this pull request May 27, 2019
**Requirements:**
- [x] Merge stashed/stash#647 to master
- [x] Merge stashed/stash#673 to master
- [x] Merge stashed/stash#674 to master
- [x] Merge stashed/stash#671 to master
- [x] Rebase against master

**Tasks:**
- [x] Update Restore Logic
- [x] Update Backup Logic
- [x] Update Workload Controllers
	- [x] Deployment
	- [x] DaemonSet
	- [x] ReplicationControler
	- [x] ReplicaSet
	- [x] StatefulSet
- [x] Fix ConfigMap lock deletion and RBAC stuff deletion logic
- [x] Ensure sidecar/init-container according to new design
	- [x] Ensure Restore init-container injection
	- [x] Ensure Restore init-container deletion
	- [x] Ensure Backup sidecar injection
	- [x] Ensure Backup sidecar deletion
- [x] Add new backup command (sagor is working)
- [x] Add new restore command

- [x] Add controller (possibly in different PR)
	- [x] PersistentVolumeClaim
	- [x] AppBinding
tamalsaha pushed a commit to stashed/apimachinery that referenced this pull request Feb 16, 2020
**Requirements:**
- [x] Merge stashed/stash#647 to master
- [x] Merge stashed/stash#673 to master
- [x] Merge stashed/stash#674 to master
- [x] Merge stashed/stash#671 to master
- [x] Rebase against master

**Tasks:**
- [x] Update Restore Logic
- [x] Update Backup Logic
- [x] Update Workload Controllers
	- [x] Deployment
	- [x] DaemonSet
	- [x] ReplicationControler
	- [x] ReplicaSet
	- [x] StatefulSet
- [x] Fix ConfigMap lock deletion and RBAC stuff deletion logic
- [x] Ensure sidecar/init-container according to new design
	- [x] Ensure Restore init-container injection
	- [x] Ensure Restore init-container deletion
	- [x] Ensure Backup sidecar injection
	- [x] Ensure Backup sidecar deletion
- [x] Add new backup command (sagor is working)
- [x] Add new restore command

- [x] Add controller (possibly in different PR)
	- [x] PersistentVolumeClaim
	- [x] AppBinding
tamalsaha pushed a commit to stashed/apimachinery that referenced this pull request Feb 16, 2020
**Requirements** : 
- [x]  Merge stashed/stash#673 to master 
- [x]  Merge stashed/stash#675 to master 
- [x] Merge stashed/stash#691
- [x] Rebase against master

**Fixed Issue** : 
- [x]  Add `BackupSession Sidecar Controller` Controller
- [x]  Controller take backup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants