that was obvious
parent
8898826916
commit
fb527e4f19
|
|
@ -1,12 +1,4 @@
|
||||||
[remote]
|
[remote]
|
||||||
type = drive
|
type = drive
|
||||||
token = {"access_token":"ya29.GlsvBx0P-xi5MILSKADEHrrHNnOIExq4WopaWsjhZDdFj6xDkJ5NsLLxnJPpYDytHBtMVg5N3Z5pfE9ad0MLD5rTpmPvPScWeML_ZPj321LT-4YZGI5BVFUb7DpU","token_type":"Bearer","refresh_token":"1/w4bWtZbYRdrx6QxezVGkwYO19UAwDCrbnB9QngotBig","expiry":"2019-06-22T12:07:42.879544991-06:00"}
|
token = {"access_token":"ya29.GlsvB2PyW6zBpy-Cq60stS6HwJ2kZvEmpu0uqEBoF7JSNsNbQeCke4EPp67r0FRsL6SooQGX5VtiYFeXKvyea5tFYb2Hk4S91Kq_W4usIDX2G6jz_dfY9q_b60vv","token_type":"Bearer","refresh_token":"1/bCag1YzbcbjLgZEpfLZzku9l293RiEzHdVNnkdIHRSo","expiry":"2019-06-22T14:01:07.9910344-06:00"}
|
||||||
|
|
||||||
[remote-enc]
|
|
||||||
type = crypt
|
|
||||||
remote = remote:cloudly/restic
|
|
||||||
filename_encryption = obfuscate
|
|
||||||
directory_name_encryption = true
|
|
||||||
password = 7goajHzgKv3SI2mamNivoqUJfHlIw1gu
|
|
||||||
password2 = 34ofTPjOpG6pVPwox8Fjaw
|
|
||||||
|
|
||||||
|
|
|
||||||
14
sync.sh
14
sync.sh
|
|
@ -25,9 +25,10 @@ function main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function install() {
|
function install() {
|
||||||
|
mkdir -p $GOPATH/bin/$(uname)
|
||||||
for i in ncw/rclone restic/restic; do
|
for i in ncw/rclone restic/restic; do
|
||||||
local b="${i##*/}"
|
local b="${i##*/}"
|
||||||
if [ -e $GOPATH/bin/$b ]; then
|
if [ -e $GOPATH/bin/$(uname)/$b ]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
go get -u github.com/$i
|
go get -u github.com/$i
|
||||||
|
|
@ -35,10 +36,11 @@ function install() {
|
||||||
case "$i" in
|
case "$i" in
|
||||||
restic* )
|
restic* )
|
||||||
go run build.go
|
go run build.go
|
||||||
mv ./restic $GOPATH/bin
|
mv ./$b $GOPATH/bin/$(uname)/$b
|
||||||
;;
|
;;
|
||||||
* )
|
* )
|
||||||
go install
|
go install
|
||||||
|
mv $GOPATH/bin/$b $GOPATH/bin/$(uname)/$b
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
popd
|
popd
|
||||||
|
|
@ -82,15 +84,15 @@ function backup() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function RCLONE() {
|
function RCLONE() {
|
||||||
$GOPATH/bin/rclone --config=$PWD/config/rclone --ask-password=false "$@"
|
$GOPATH/bin/$(uname)/rclone --config=$PWD/config/rclone --ask-password=false "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
function RESTIC() {
|
function RESTIC() {
|
||||||
RESTIC_PASSWORD=$PASSWORD \
|
RESTIC_PASSWORD=$PASSWORD \
|
||||||
$GOPATH/bin/restic \
|
$GOPATH/bin/$(uname)/restic \
|
||||||
-r rclone:remote:cloudly/restic-plain/backup \
|
-r rclone:remote:cloudly/restic-plain/backup \
|
||||||
-o rclone.program=$GOPATH/bin/rclone \
|
-o rclone.program=$GOPATH/bin/$(uname)/rclone \
|
||||||
-o rclone.args="serve restic --stdio --b2-hard-delete --drive-use-trash=false --config $PWD/config/rclone --bwlimit 20M --ask-password=false" \
|
-o rclone.args="serve restic --stdio --b2-hard-delete --drive-use-trash=false --config $PWD/config/rclone --bwlimit 6M --ask-password=false" \
|
||||||
"$@"
|
"$@"
|
||||||
|
|
||||||
#-r rclone:remote-enc:backup
|
#-r rclone:remote-enc:backup
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue