SHARE
TWEET

Untitled

a guest Oct 23rd, 2017 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. backup.firebird  
  2. #!/bin/sh
  3. OUTPUTFILE='/home/backup/ERGOFAKT.GBK.XXXXXX'
  4. #
  5. # First Step create a backup in a tmp file...
  6. #
  7. /usr/local/firebird/bin/gbak -v -t localhost:/home/datenbank/ERGOFAKT.GDB $OUTPUTFILE 1>/dev/null 2>/dev/null
  8. #
  9. # Next Step copy the file and copy to timecapsule...
  10. #
  11. if [ "$?" = "0" ] ; then
  12.  cp $OUTPUTFILE /home/backup/ERGOFAKT.GBK-`date +%w`
  13.  sleep 10
  14.  mount -t smbfs //192.168.206.66/user /mnt/backup-timecapsule -o username=user,password=user
  15.  sleep 10
  16.  cp /home/backup/ERGOFAKT.GBK-`date +%w` /mnt/backup-timecapsule/backup/ERGOFAKT.GDK-`date +%w`
  17.  sleep 10
  18.  umount /mnt/backup-timecapsule
  19. fi
  20.  
  21.  
  22. backup.ergofakt
  23. #!/bin/sh
  24.  
  25. TMPFILE=`mktemp /home/backup/ERGOFAKT.GDB.XXXXXX`
  26. cp /home/datenbank/ERGOFAKT.GDB $TMPFILE 1>/dev/null 2>/dev/null
  27. if [ "$?" = "0" ] ; then
  28.   cp $TMPFILE /home/backup/ERGOFAKT.GDB-`date +%w`
  29.   mv $TMPFILE /mnt/netz/ERGOFAKT.GDB-`date +%w`
  30. else
  31.   echo $TMPFILE | mail -s "Backup ERGOFAKT.GDB fehlgeschlagen" postmaster
  32. fi
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top