Changes

From Amahi Wiki
Jump to: navigation, search
221 bytes added ,  04:26, 14 December 2013
yum install p7zip mailx
* Create <b>znc-backup.sh</b> and place it in /var/hda/web-apps/znc/html directory (ensure you change the USER as noted below):
<pre>
vi /var/hda/web-apps/znc/html/znc-backup.sh
</pre>
<pre>
#!/bin/bash
DATEI2=$(date +%Y-%m-%d)_znc_backup.tar.7z
DATUM=$(date +%Y-%m-%d)
sevenzp="a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on -mhe=on -p=$PASSWORD"
### no Change after here
if [ ! -d "$DIR" ]; then echo "You MUST change DIR variable. TAR. Visit: http://wiki.znc.in/index.php?title=ZNC_Backup"; exit 0; fi
rm -f $DATEI1 $DATEI2
</pre>
* Make script executable
chmod 755 /var/hda/web-apps/znc/html/znc-backup.sh
* To run manually, execute the script from the /var/hda/web-apps/znc/html directory
./znc-backup.sh
* Install a cron job as your First Admin User, not root:
crontab -e
** Insert the following text:
40 0 * * 5 /var/hda/web-apps/znc/html/znc-backup.sh >/dev/null 2>&1
** This will run on Fri at 00:40 AM, but you can change to meet your needs.
12,424

edits