To create new wiki account, please join us on #znc at Libera.Chat and ask admins to create a wiki account for you. You can say thanks to spambots for this inconvenience.

ZNC Backup and Template:Providers/table: Difference between pages

From ZNC
(Difference between pages)
Jump to navigation Jump to search
Created page with "{{Languages}} Here is described how you can get your ZNC data dir emailed to you once per week. === Needed Software === ; p7zip : ''Very high compression ratio file archiver'..."
 
m removed bncfor.me at owners request
 
Line 1: Line 1:
{{Languages}}
<noinclude>
Here is described how you can get your ZNC data dir emailed to you once per week.
<!--
 
======================================================================
=== Needed Software ===
For location codes, please refer to https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
; p7zip : ''Very high compression ratio file archiver''
Use exceptions, most notably UK instead of GB, listed here https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Exceptional_reservations
; tar : ''A GNU file archiving program'' (Should be preinstalled virtually everywhere)
======================================================================  
; SendEmail : http://caspian.dotconf.net/menu/Software/SendEmail/ (I didn't find this in any linux distro so far)
Providers are sorted by "Date Started", which is either the date in which the provider officially started delivering services, the date
 
their domain was registered (if reliable information), or the date added to the ZNC table list.
=== Backup Script ===
-->
After the installation a small script is created in the user's home dir.
</noinclude>[<span class="plain links">[{{fullurl:Template:Providers/table|action=edit}} Edit data]</span>]
vi znc-backup.sh
{| class="wikitable sortable" border="1"
This should be the content:
! rowspan="2" | Provider
#!/bin/bash
! colspan="2" | Max Networks per User
DATEI1=$(date +%Y-%m-%d)_znc_backup.tar
! rowspan="2" | ZNC Version
DATEI2=$(date +%Y-%m-%d)_znc_backup.tar.7z
! rowspan="2" | Language
DATUM=$(date +%Y-%m-%d)
! rowspan="2" class="unsortable" | IRC Support
USER=znc
! rowspan="2" | Date Started
sevenzp=a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on -mhe=on -p=Pa7Sw0r7
! rowspan="2" class="unsortable" | ZNC locations<br><small style="font-weight:normal">([[wikipedia:ISO 3166-1 alpha-2#Officially_assigned_code_elements|country codes]], using [[wikipedia:ISO 3166-1 alpha-2#Exceptional_reservations|exceptions]])</small>
MAILADRESSE1=deine{at}email.de
|-
DIR=/home/$USER/.znc
! Default
/usr/bin/tar -cvf $DATEI1 $DIR
! Premium
/usr/bin/7za $sevenzp $DATEI2 $DATEI1
|-
/usr/bin/sendEmail -f $USER@your.host -u ZNC-Backup-$DATUM -m ZNC Backup from $DATUM -a $DATEI2 -t $MAILADRESSE1
|[https://www.xshellz.com xShellz]
rm -f $DATEI1 $DATEI2
| 2
 
| data-sort-value="30" | 12, 20, or 30
These lines should be customized:
| 1.6.1
USER=
| English
sevenzp= ''(just the password at the end)''
| {{irc|chat.freenode.net|xShellz}}
MAILADRESSE1=
| <span style="display:none">&{{#expr:3e11+{{#time:U|..}}}}</span>2009-03-01
/usr/bin/sendEmail -f $USER@your.host
| <abbr title="United States of America">US</abbr>, <abbr title="United Kingdom">UK</abbr>
Please notice the line <code>7za $sevenzp $DATEI2 $DATEI1</code>. With some distros the 7zip binary is called <code>7z</code> instead of <code>7za</code>. Change this if appropriate.
|-
 
|[https://panicbnc.net/ PanicBNC]
If you don't have 1 GB of RAM, you might have to lower the compression rate. This is done with the parameter <code>-mx=X</code> in the <code>sevenzp=...</code>-line. <code>X</code> is the compression rate, which might be between 0 and 9 where 0 means no compression.
| 2
 
| unlimited
Now the script must be made executable:
| 1.7.1*
chmod a+x znc-backup.sh
| English
 
| {{irc|irc.esper.net|PanicBNC}}
Now you should test the script manually:
| <span style="display:none">&{{#expr:3e11+{{#time:U|..}}}}</span>2012-02-01
./znc-backup.sh
| <abbr title="Australia">AU</abbr>, <abbr title="Canada">CA</abbr>, <abbr title="Germany">DE</abbr>, <abbr title="France">FR</abbr>, <abbr title="Japan">JP</abbr>, <abbr title="Netherlands">NL</abbr>, <abbr title="Poland">PL</abbr>, <abbr title="Singapur">SG</abbr>, <abbr title="United Kingdom">UK</abbr>, <abbr title="United States of America">US</abbr>
 
|-
If everything works fine, we can now set up the crontab entry, else you have to find and fix the error.
|[https://znc.bg ZNC.BG]
 
| 1
=== Crontab ===
|
You can edit your crontab with this command:
| 1.6.3*
crontab -e
| English
Now add this line somewhere:
| {{irc|irc.v.bg|znc}}
40 0  * * 4 cd /home/znc; ./znc-backup.sh >/dev/null 2>&1
| <span style="display:none">&{{#expr:3e11+{{#time:U|..}}}}</span>2016-01-25
 
| <abbr title="Bulgaria">BG</abbr>, <abbr title="Czech Republic">CZ</abbr>, <abbr title="Germany">DE</abbr>, <abbr title="Italy">IT</abbr>
My crontab looks like this:
|-
* * * * *  cd /home/znc/znc/bin; ./znc >/dev/null 2>&1
|[https://lunarbnc.net LunarBNC]
40 0  * * 4 cd /home/znc;        ./znc-backup.sh >/dev/null 2>&1
| unlimited
There is a check if ZNC is still running caried out every minute.
|
The second line starts the backup script once per week on Thursday (<code>4</code>) at 0:40 am (<code>40 0</code>).
| 1.7.1*
 
| English
[[Category:ZNC]]
| {{irc|irc.lunarirc.net|lunarbnc}}
| <span style="display:none">&{{#expr:3e11+{{#time:U|..}}}}</span>2016-11-04
| <abbr title="Germany">DE</abbr>
|-
|[https://suchznc.net SuchZNC]
| unlimited
|
| 1.7-git*
| English
| {{irc|chat.freenode.net|suchznc}}
| <span style="display:none">&{{#expr:3e11+{{#time:U|..}}}}</span>2017-05-09
| <abbr title="Netherlands">NL</abbr>
|-
|[https://znc.quoque.ru QUOQUE ZNC]
| 1
| 10
| 1.6.6
| English
| {{irc|chat.freenode.net|qz}}
| <span style="display:none">&{{#expr:3e11+{{#time:U|..}}}}</span>2017-11-02
| <abbr title="United States of America">US</abbr>
|-
|[https://znc.gamers.bg ZNC Gamers]
| 1
|
| 1.6.5*  
| English
| {{irc|irc.gamers.bg|znc}}
| <span style="display:none">&{{#expr:3e11+{{#time:U|..}}}}</span>2017-11-15
| <abbr title="Bulgaria">BG</abbr>
|-
|[http://viaplus.weebly.com/viabnc.html viaBNC]
| 5 (specified)
|
| 1.6.6
| Spanish / English
| {{irc|chat.freenode.net|viaBNC}}
| <span style="display:none">&{{#expr:3e11+{{#time:U|..}}}}</span>2018-02-21
| <abbr title="Canada">CA</abbr>, <abbr title="United States of America">US</abbr>
|-
|[http://bnc4you.ml bnc4you]
| 2
|
| 1.6.6
| English
| {{irc|chat.freenode.net|bnc4you}}
| <span style="display:none">&{{#expr:3e11+{{#time:U|..}}}}</span>2018-03-03
| <abbr title="Turkey">TR</abbr>
|-
|}

Revision as of 14:28, 15 October 2018

[Edit data]

Provider Max Networks per User ZNC Version Language IRC Support Date Started ZNC locations
(country codes, using exceptions)
Default Premium
xShellz 2 12, 20, or 30 1.6.1 English #xShellz@chat.freenode.net &3017135676942009-03-01 US, UK
PanicBNC 2 unlimited 1.7.1* English #PanicBNC@irc.esper.net &3017135676942012-02-01 AU, CA, DE, FR, JP, NL, PL, SG, UK, US
ZNC.BG 1 1.6.3* English #znc@irc.v.bg &3017135676942016-01-25 BG, CZ, DE, IT
LunarBNC unlimited 1.7.1* English #lunarbnc@irc.lunarirc.net &3017135676942016-11-04 DE
SuchZNC unlimited 1.7-git* English #suchznc@chat.freenode.net &3017135676942017-05-09 NL
QUOQUE ZNC 1 10 1.6.6 English #qz@chat.freenode.net &3017135676942017-11-02 US
ZNC Gamers 1 1.6.5* English #znc@irc.gamers.bg &3017135676942017-11-15 BG
viaBNC 5 (specified) 1.6.6 Spanish / English #viaBNC@chat.freenode.net &3017135676942018-02-21 CA, US
bnc4you 2 1.6.6 English #bnc4you@chat.freenode.net &3017135676942018-03-03 TR