This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# zfs snapshot auto-rotation | |
# | |
# usage: zfs_snapshot.sh <mountpoint> <snapshot name> <number of keeping snapshots> [recursive] | |
# | |
# recursive option: Recursively create snapshot (zfs snapshot -r) | |
# | |
# for crontab | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Just a small script I wrote to backup mysql via ZFS snapshots | |
#!/bin/sh | |
# Copyright (c) 2011 Vladislav V. Prodan <universite at ukr.net> | |
# My MySQL server uses the directory: | |
# tank/mysql # main directory MySQL | |
# tank/mysql/ibdata # data of InnoDB tables | |
# tank/mysql/iblogs # InnoDB transaction logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Random generator ipv6 addresses within your ipv6 network prefix. | |
#!/usr/local/bin/bash | |
# Copyright | |
# Vladislav V. Prodan | |
# universite@ukr.net | |
# 2011 | |
array=( 1 2 3 4 5 6 7 8 9 0 a b c d e f ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "date +'%F %R:%S'" > /root/VPSbackups/last.timestamp.backup | |
tar czvf /root/VPSbackups/VPSbackup.tar.gz -N"$LAST" --exclude-from=/VPSbackups/tar.excludelist.txt /etc/ /root/exportdb/ /home/username/ > /root/VPSbackups/backup.log 2>&1 | |
##где tar.excludelist.txt - список исключений; | |
##а LAST - файл с датой в формате date +'%F %R:%S' | |
LAST=`cat /root/VPSbackups/last.timestamp.backup` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#The initial creation of ZFS partition for further incremental copying | |
pool=zroot #source distination | |
pool2=tank #recipient pool | |
volume2=$pool2/backup/$pool #recipient | |
fs_list='/mysql /usr /usr/ports /usr/src /usr/home /tmp /var /var/crash /var/db /var/db/pkg | |
/var/empty /var/imap /var/imap-cache /var/log /var/mail /var/run /var/tmp'" | |
"`zfs list | grep ^zroot/www | awk ' {print $5}' | tr "\r\n" " "` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Copyright Andrey Mitrofanov | |
# Copyright pavlinux http://pavlinux.ru | |
# 2011 | |
MAXCOUNT=20 | |
count=0 | |
network_v6=2a01:7a0:2:12 # your ipv6 network prefix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
set -e | |
#set -x | |
# ask user for password | |
read -p "Input password for check: " -t 30 passwd | |
# sha1sum replaced openssl sha1 | awk '{ print $2;}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Install Factorio server in Debian 8.x-9.x | |
apt-key update; apt-get update && apt-get -y install lsb-release ca-certificates | |
[ ! -d /opt ] && mkdir -p /opt; | |
cd '/opt' | |
apt-get -y install git mc screen | |
git clone https://github.com/Bisa/factorio-init.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
NANO_NAME=gateway-j3160 | |
NANO_SRC=/data/src | |
NANO_OBJ=/usr/obj/nanobsd/gateway.v3 | |
NANO_ROOT_DIR=/usr/home/lev/nanobsd | |
NANO_CONFROOT=${NANO_ROOT_DIR}/gateway.v3 | |
NANO_TOOLS=${NANO_ROOT_DIR}/scripts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- cbsdd.orig 2019-05-07 01:58:50.410050000 +0300 | |
+++ cbsdd 2019-05-07 02:01:56.420224000 +0300 | |
@@ -6,6 +6,12 @@ | |
CBSDMODULE="taskd" | |
EXTHELP="wf_taskd.html" | |
+file_log=/var/log/cbsd/cbsd.log | |
+ | |
+log123() { | |
+ echo "[$(date +'%Y-%m-%dT%H:%M:%S%z')]: $@" >> ${file_log} |
OlderNewer