(Scripts|SystemD)~rework backup system
This is purely for the desktop: only enable if you fix it up.
This commit is contained in:
@@ -2,8 +2,7 @@
|
||||
|
||||
set -xe
|
||||
|
||||
dir=$2/backup
|
||||
arch=$2/archive
|
||||
dir=/media/hdd/backup
|
||||
name="$(date +%F)-$(date +%T)-$(basename $1).tar.xz"
|
||||
|
||||
XZ_OPT='-T0 -9' tar -Jcvf $dir/$name $1
|
||||
|
||||
15
Scripts/.local/scripts/do_backup
Executable file
15
Scripts/.local/scripts/do_backup
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
set -xe
|
||||
|
||||
dir="/media/hdd/backup/$(date +%F)/$(date +%T)"
|
||||
folders="$HOME/Code $HOME/Dotfiles $HOME/Downloads $HOME/Media $HOME/Pictures $HOME/Projects $HOME/Text"
|
||||
|
||||
mkdir -p $dir
|
||||
|
||||
for name in $folders
|
||||
do
|
||||
out_name=$dir/$(basename $name).tar.xz
|
||||
XZ_OPT='-T0 -9' tar -Jcvf $out_name -C $name .
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user