(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:
9
Scripts/.local/scripts/create_backup
Executable file
9
Scripts/.local/scripts/create_backup
Executable 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
|
||||
Reference in New Issue
Block a user