aboutsummaryrefslogtreecommitdiff
path: root/sysutils/omnibackup
diff options
context:
space:
mode:
authorBabak Farrokhi <farrokhi@FreeBSD.org>2018-07-18 12:48:33 +0000
committerBabak Farrokhi <farrokhi@FreeBSD.org>2018-07-18 12:48:33 +0000
commit649f0708ceca11c9c49f63264316f2f509beeade (patch)
tree3c162b6ac0e6d2e5758daa0b68bd73a47c4b19ad /sysutils/omnibackup
parent94960998fa874ccb57497eb5e48bdf09e4c4603b (diff)
downloadports-649f0708ceca11c9c49f63264316f2f509beeade.tar.gz
ports-649f0708ceca11c9c49f63264316f2f509beeade.zip
New port: sysutils/omnibackup: One Script to back them all up
PR: 212953 Submitted by: Mohammad S. Babaei <info@babaei.net>
Notes
Notes: svn path=/head/; revision=474859
Diffstat (limited to 'sysutils/omnibackup')
-rw-r--r--sysutils/omnibackup/Makefile76
-rw-r--r--sysutils/omnibackup/distinfo3
-rw-r--r--sysutils/omnibackup/files/pkg-message.in32
-rw-r--r--sysutils/omnibackup/pkg-descr21
4 files changed, 132 insertions, 0 deletions
diff --git a/sysutils/omnibackup/Makefile b/sysutils/omnibackup/Makefile
new file mode 100644
index 000000000000..c7e7600c8987
--- /dev/null
+++ b/sysutils/omnibackup/Makefile
@@ -0,0 +1,76 @@
+# Created by: Mohammad S. Babaei <info@babaei.net>
+# $FreeBSD$
+
+PORTNAME= omnibackup
+PORTVERSION= 0.2.0
+CATEGORIES= sysutils
+
+MAINTAINER= info@babaei.net
+COMMENT= One Script to back them all up
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+NO_OPTIONS_SORT= yes
+OPTIONS_DEFINE= \
+ DOCS \
+ OPENLDAP \
+ PGSQL \
+ MYSQL
+OPTIONS_DEFAULT= \
+ DOCS \
+ OPENLDAP \
+ PGSQL \
+ MYSQL
+
+OPENLDAP_DESC= OpenLDAP support
+
+NO_ARCH= yes
+NO_BUILD= yes
+RUN_DEPENDS+= \
+ bash:shells/bash \
+ flock:sysutils/flock \
+ jq:textproc/jq
+
+SUB_FILES= pkg-message
+SUB_LIST= ROOT_HOME=/root
+
+PLIST_FILES= \
+ bin/omnibackup \
+ ${ETCDIR}/config.json.sample
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MDOCS}
+PLIST_FILES+= ${DOCSDIR}/README.md
+.endif
+
+.if ${PORT_OPTIONS:MOPENLDAP} \
+ || ${PORT_OPTIONS:MPGSQL} \
+ || ${PORT_OPTIONS:MMYSQL}
+RUN_DEPENDS+= sudo:security/sudo
+.if ${PORT_OPTIONS:MOPENLDAP}
+RUN_DEPENDS+= slapcat:net/openldap24-server
+.endif
+.if ${PORT_OPTIONS:MPGSQL}
+USES+= pgsql
+RUN_DEPENDS+= pg_dump:databases/postgresql${PGSQL_VER_NODOT}-client
+RUN_DEPENDS+= pg_dumpall:databases/postgresql${PGSQL_VER_NODOT}-client
+.endif
+.if ${PORT_OPTIONS:MMYSQL}
+USES+= mysql
+RUN_DEPENDS+= mysqldump:${_MYSQL_CLIENT}
+.endif
+.endif
+
+USE_GITHUB= yes
+GH_ACCOUNT= NuLL3rr0r
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/backup.sh ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+ @${MKDIR} ${STAGEDIR}${ETCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/config.json.sample ${STAGEDIR}${ETCDIR}/config.json.sample
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_MAN} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.mk>
diff --git a/sysutils/omnibackup/distinfo b/sysutils/omnibackup/distinfo
new file mode 100644
index 000000000000..c09554b1f134
--- /dev/null
+++ b/sysutils/omnibackup/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1531912738
+SHA256 (NuLL3rr0r-omnibackup-0.2.0_GH0.tar.gz) = 87de9bb1b6561b5c019cb1c740a5e1046fa593a148fe3d99f04c6777da56acb7
+SIZE (NuLL3rr0r-omnibackup-0.2.0_GH0.tar.gz) = 47645
diff --git a/sysutils/omnibackup/files/pkg-message.in b/sysutils/omnibackup/files/pkg-message.in
new file mode 100644
index 000000000000..0e0c12004b64
--- /dev/null
+++ b/sysutils/omnibackup/files/pkg-message.in
@@ -0,0 +1,32 @@
+###############################################################################
+
+In order to run OmniBackup, you will need to create and configure the main
+configuration file, e.g.:
+
+$ cp -p %%LOCALBASE%%/etc/omnibackup/config.json.sample \
+ %%LOCALBASE%%/etc/omnibackup/config.json
+
+or, create it in the root users' home directory:
+
+$ cp -p %%LOCALBASE%%/etc/omnibackup/config.json.sample \
+ %%ROOT_HOME%%/.omnibackup/config.json
+
+In order to take automatic backups every 24 hours at 01:00am UTC run this
+command:
+
+$ crontab -e -u root
+
+Then add the following lines to the root users' crontab:
+
+# OmniBackup daily backups
+00 01 * * * %%LOCALBASE%%/bin/omnibackup
+
+To avoid data loss, make sure to consult the documentation at:
+
+* %%LOCALBASE%%/share/doc/omnibackup/README.md
+or
+* https://github.com/NuLL3rr0r/omnibackup
+
+Before you use it in production.
+
+###############################################################################
diff --git a/sysutils/omnibackup/pkg-descr b/sysutils/omnibackup/pkg-descr
new file mode 100644
index 000000000000..e8e2970d3c18
--- /dev/null
+++ b/sysutils/omnibackup/pkg-descr
@@ -0,0 +1,21 @@
+OmniBackup is a MIT-licensed, feature rich, pure Bash script which assists you
+in taking periocdic backups from OpenLDAP, PostgreSQL, MariaDB / MySQL and your
+filesystem. It also lets you extend OmniBackup by creating custom backup
+scenarios and defining your own customized scripts.
+
+Configuration in OmniBackup is done through JSON. It also provides plenty of
+compression and cryptography algorithms such as LZMA2, gzip and bzip2
+compression algorithms, and AES-128, AES-192 and AES-256 symmetric cryptography
+algorithms. Furthermore, it has support for RSA signatures to verify the backup
+origin and integrity on remote servers. MD4, MD5, MDC-2, RIPEMD160, SHA, SHA-1,
+SHA-224, SHA-256, SHA-384, SHA-512 and WHIRLPOOL are supported as backup
+integrity hash algorithms.
+
+It supports multiple backup servers and as many as reports recipients through
+email. It has the optional ability to follow symbolic links or to preserve
+permissions inside backup files. And, last but not least it provides random
+passphrase generation for encrypted archives with variable length and patterns
+or a unique passphrase for all backups. It's also possible to encrypt each
+passphrase by using RSA public keys for individual backup servers.
+
+WWW: https://github.com/NuLL3rr0r/omnibackup