(Scripts)+create_backup,+folder_size

create_backup does the obvious using tar and xz.  Needs two arguments
for what and where.  folder_size does the obvious using du.
This commit is contained in:
2023-09-22 14:54:21 +01:00
parent 2bd582e419
commit a00480771a
2 changed files with 12 additions and 0 deletions

View File

@@ -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

View File

@@ -0,0 +1,3 @@
#!/usr/bin/sh
du -BM -d $1 | sort -n