backup-script/backup.sh

13 lines
353 B
Bash
Raw Normal View History

2024-08-04 15:25:17 -04:00
#!/bin/bash
2025-01-23 15:28:48 -05:00
echo "enter full path to data directory"
echo "if adding multiple directorys add a space"
2024-08-04 15:25:17 -04:00
read data
echo "enter size of backup media"
2025-01-19 17:26:08 -05:00
echo "format: 24G"
2024-08-04 15:25:17 -04:00
read disk
mkdir -p out
2025-02-11 14:09:01 -05:00
XZ_OPT=-8 tar -cvJpf - $data | openssl enc -e --aes256 -pbkdf2 --out - | split -d -b $disk - out/backup.tar.xz && sha256sum out/backup.tar.xz* >> backup-CHECKSUM