diff options
-rwxr-xr-x | Scripts/.local/scripts/create_backup | 9 | ||||
-rwxr-xr-x | Scripts/.local/scripts/folder_size | 3 |
2 files changed, 12 insertions, 0 deletions
diff --git a/Scripts/.local/scripts/create_backup b/Scripts/.local/scripts/create_backup new file mode 100755 index 0000000..cde5a03 --- /dev/null +++ b/Scripts/.local/scripts/create_backup @@ -0,0 +1,9 @@ +#!/usr/bin/env sh + +set -xe + +dir=$2/backup +arch=$2/archive +name="$(date +%F)-$(date +%T)-$(basename $1).tar.xz" + +XZ_OPT='-T0 -9' tar -Jcvf $dir/$name $1 diff --git a/Scripts/.local/scripts/folder_size b/Scripts/.local/scripts/folder_size new file mode 100755 index 0000000..fe136c6 --- /dev/null +++ b/Scripts/.local/scripts/folder_size @@ -0,0 +1,3 @@ +#!/usr/bin/sh + +du -BM -d $1 | sort -n |