Post

Visualizzazione dei post con l'etichetta crontab

Restic backup script simple (fresco fresco callo callo)

  ### backupscript.sh export RESTIC_REPOSITORY=sftp:administrator@172.16.7.1:/e:/resticroot ##this is a windows sftp server export RESTIC_PASSWORD=passwordstring restic --verbose backup /srv if [ $? -ne 0 ] then   sed -i '1s/^/Subject: restic error\n/' /root/restic_jobs/transcript.log   cat /root/restic_jobs/transcript.log | ssmtp -vvv email@provider.com fi restic --verbose forget --keep-last 2 --prune         if [ $? -ne 0 ] then sed -i '1s/^/Subject: restic error\n/' /root/restic_jobs/transcript.log cat /root/restic_jobs/transcript.log | ssmtp -vvv email@provider.com fi #### ssmtp.conf # # Config file for sSMTP sendmail # # The person who gets all mail for userids < 1000 # Make this empty to disable rewriting. root=postmaster # The place where the mail goes. The actual machine name is required no # MX records are consulted. Commonly mailhosts are named mail.domain.com #mailhub=mail # Where will the mail seem to come from? #rewriteDomain= #...