diff --git a/backup.sh b/backup.sh new file mode 100644 index 0000000..88717a6 --- /dev/null +++ b/backup.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +_dest_dir='/mnt/4tb/data/backup/Pass' + +_date=$(date +%s) + +for _src_filename in *.kdbx; do + [ -e "$_src_filename" ] || continue + _dest="$_dest_dir/$_date-$_src_filename" + cp "$_src_filename" "$_dest" +done + +echo "Backups:" +ls "$_dest_dir" +echo "" +echo "Backup location: $_dest_dir" +echo "Backup count: $(ls $_dest_dir | wc -l)" +echo "Backup size: $(du -hs $_dest_dir | cut -f1)" \ No newline at end of file