view backup/macos/luanBackup.sh @ 1700:47302bc83b2e

use local luan
author Vadim Filimonov <fffilimonov@yandex.ru>
date Tue, 28 Jun 2022 17:49:27 +0300
parents e6750146faa1
children 077366d117bb
line wrap: on
line source

#!/bin/bash

BKP=/Volumes/External/luanBackup
DIR=/Users/administrator/luan/backup

function bkp_machine() {
  mkdir -p $BKP 2>/dev/null;

  rm -f `find $BKP/ -name '*.tgz' -mmin +4000`;

  cd $DIR;
  rm -rf backups.copy;
  ./luan copy_backups.luan
  tar czvf /Volumes/External/luanBackup/$(date +"backup%Y%m%d%H%M").tgz backups.copy;
}

sleep 60;
bkp_machine;

sleep 3600;