Mercurial Hosting > luan
annotate backup/macos/luanBackup.sh @ 1699:e6750146faa1
no restart on backup
author | Vadim Filimonov <fffilimonov@yandex.ru> |
---|---|
date | Tue, 28 Jun 2022 16:13:37 +0300 |
parents | 09aaca079ff3 |
children | 47302bc83b2e |
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; | |
1699
e6750146faa1
no restart on backup
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
1694
diff
changeset
|
12 rm -rf backups.copy; |
e6750146faa1
no restart on backup
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
1694
diff
changeset
|
13 luan copy_backups.luan |
e6750146faa1
no restart on backup
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
1694
diff
changeset
|
14 tar czvf /Volumes/External/luanBackup/$(date +"backup%Y%m%d%H%M").tgz backups.copy; |
1694 | 15 } |
16 | |
17 sleep 60; | |
18 bkp_machine; | |
19 | |
20 sleep 3600; |