common: Added support for files backups
parent
f61da86598
commit
c02b88bf2e
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e;
|
||||||
|
|
||||||
|
# Arguments
|
||||||
|
path="$1";
|
||||||
|
name="$2";
|
||||||
|
|
||||||
|
# Variables
|
||||||
|
dir="$(dirname "$path")";
|
||||||
|
base="$(basename "$path")";
|
||||||
|
dest={{ backups_files_directory | quote }}"/$name.tar.gpg";
|
||||||
|
|
||||||
|
# Execution
|
||||||
|
tar -C "$dir" -cf "$dest" "$base" | buffer -m 128M -s 128K | gpg --quiet --no-verbose --encrypt --recipient 73D09948B2392D688A45DC8393E1BD26F6B02FB7 --trust-model always > "$dest";
|
||||||
|
chmod u+r-wx,g+r-wx,o+r-wx "$dest";
|
||||||
|
{{ global_helper_directory | quote }}/backup_rename.sh "$dest";
|
Loading…
Reference in New Issue