initial import
This commit is contained in:
parent
f8b4ed3351
commit
a8b69a8db2
35 changed files with 11590 additions and 0 deletions
20
bin/localbak.sh
Executable file
20
bin/localbak.sh
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# ensure pinentry-tty is installed
|
||||
|
||||
DTS=$(date "+%Y%m%d%H%M")
|
||||
TGZ="bkp/syslocal-${DTS}.tgz"
|
||||
TGT="remote:"
|
||||
|
||||
cd "${HOME}" || exit 1
|
||||
[[ -d system ]] || exit 1
|
||||
[[ -d bkp ]] || exit 1
|
||||
|
||||
echo "Creating ${TGZ} ..."
|
||||
tar -czf "${TGZ}" system/*
|
||||
echo "Encrypting ${TGZ} ..."
|
||||
gpg -c "${TGZ}"
|
||||
echo "Removing unencrypted ${TGZ} ..."
|
||||
rm -v "${TGZ}"
|
||||
echo "Syncing backups..."
|
||||
rclone -PL sync bkp/ "${TGT}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue