view backup/macos/luanBackup.sh @ 1697:aff2309ae510

add copy_backups.luan
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 27 Jun 2022 18:36:56 -0600
parents 09aaca079ff3
children e6750146faa1
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;
  ./stop.sh
  tar czvf /Volumes/External/luanBackup/$(date +"backup%Y%m%d%H%M").tgz backups;
  ./start.sh
}

sleep 60;
bkp_machine;

sleep 3600;