annotate backup/macos/luanBackup.sh @ 1790:a8c685a894b4

start xml work
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 25 Dec 2023 23:07:59 -0700
parents 077366d117bb
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1694
09aaca079ff3 add backup script
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
1 #!/bin/bash
09aaca079ff3 add backup script
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
2
09aaca079ff3 add backup script
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
3 BKP=/Volumes/External/luanBackup
09aaca079ff3 add backup script
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
4 DIR=/Users/administrator/luan/backup
09aaca079ff3 add backup script
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
5
09aaca079ff3 add backup script
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
6 function bkp_machine() {
09aaca079ff3 add backup script
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
7 mkdir -p $BKP 2>/dev/null;
09aaca079ff3 add backup script
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
8
09aaca079ff3 add backup script
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
9 rm -f `find $BKP/ -name '*.tgz' -mmin +4000`;
09aaca079ff3 add backup script
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
10
09aaca079ff3 add backup script
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
11 cd $DIR;
1699
e6750146faa1 no restart on backup
Vadim Filimonov <fffilimonov@yandex.ru>
parents: 1694
diff changeset
12 rm -rf backups.copy;
1701
077366d117bb use local luan
Vadim Filimonov <fffilimonov@yandex.ru>
parents: 1700
diff changeset
13 ./luan.sh copy_backups.luan
1699
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
09aaca079ff3 add backup script
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
15 }
09aaca079ff3 add backup script
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
16
09aaca079ff3 add backup script
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
17 sleep 60;
09aaca079ff3 add backup script
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
18 bkp_machine;
09aaca079ff3 add backup script
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
19
09aaca079ff3 add backup script
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
diff changeset
20 sleep 3600;