latest
This commit is contained in:
26
2022-external-backup/Makefile
Normal file
26
2022-external-backup/Makefile
Normal file
@@ -0,0 +1,26 @@
|
||||
TARGET := ./berlin.sneak.fs.NNNY-cyberdyne-backup-01
|
||||
|
||||
default: backup
|
||||
|
||||
backup: do_file_backup write_checksum
|
||||
|
||||
write_checksum:
|
||||
cd $(TARGET)/fs && find . -type f -print0 | xargs -0 sha1sum > ../.SHASUMS.tmp
|
||||
mv ./.SHASUMS.tmp ./$(TARGET)/SHASUMS.txt
|
||||
|
||||
#--exclude=/tmp \
|
||||
|
||||
do_file_backup:
|
||||
rsync -avP \
|
||||
--exclude=/.cache \
|
||||
--exclude=/.nvm \
|
||||
--exclude=/.Trash \
|
||||
--exclude=/Library/Caches \
|
||||
--exclude=/Library/Mail \
|
||||
--exclude=/Library/Developer \
|
||||
--exclude=.DS_Store \
|
||||
--delete-before \
|
||||
--delete-excluded \
|
||||
$(HOME)/ $(TARGET)/fs/
|
||||
echo '# $(shell date -u)' > $(TARGET)/lastbackup.txt
|
||||
date -u '+%s' >> $(TARGET)/lastbackup.txt
|
||||
Reference in New Issue
Block a user