[Arch] fix network, delete bar_scripts
[dotfiles_afify.git] / .scripts / deploy_backup.sh
blob4c71c160abf3568c92af209d1c7972ffefcc0102
1 #!/usr/bin/env bash
3 backup_dir=/mnt/sd1/backups
4 backup_file=$(ls $backup_dir | sort -rt_ -k2 | head -n 1)
5 mkdir /tmp/sd1backup
6 destination=/tmp/sd1backup
8 # extract and copy to /tmp
9 cd $destination && tar xvfj $backup_dir/$backup_file
11 # copy to home
12 cp -r $destination/.ssh ~/
13 cp -r $destination/.password-... ~/
14 cp -r $destination/.gnupg ~/
16 # ls | sed -e 's/.*_\(..\)\(..\)\(....\)_\(T.*\)/& \3\2\1\4/' | \
17 # sort -rk2 | awk '{ print $1; exit }'