Mercurial Hosting > luan
annotate backup/macos/luanBackup.sh @ 1694:09aaca079ff3
add backup script
author | Vadim Filimonov <fffilimonov@yandex.ru> |
---|---|
date | Mon, 20 Jun 2022 11:12:25 +0300 |
parents | |
children | e6750146faa1 |
rev | line source |
---|---|
1694 | 1 #!/bin/bash |
2 | |
3 BKP=/Volumes/External/luanBackup | |
4 DIR=/Users/administrator/luan/backup | |
5 | |
6 function bkp_machine() { | |
7 mkdir -p $BKP 2>/dev/null; | |
8 | |
9 rm -f `find $BKP/ -name '*.tgz' -mmin +4000`; | |
10 | |
11 cd $DIR; | |
12 ./stop.sh | |
13 tar czvf /Volumes/External/luanBackup/$(date +"backup%Y%m%d%H%M").tgz backups; | |
14 ./start.sh | |
15 } | |
16 | |
17 sleep 60; | |
18 bkp_machine; | |
19 | |
20 sleep 3600; |