Code Monkey home page Code Monkey logo

hcb's Introduction

Honne Cloud Backup

Description

Performs backups from Directories, SQL Server, MySQL, Oracle, PostgreSQL and MongoDb and upload to AWS S3, Azure Blob or Google Cloud Storage

Requirements

Build

Execute

mvn package

Documentation

Execute

mvn javadoc:javadoc

Installation

1.- Install java 8
2.- Build and copy the package
3.- Execute "java -jar HCB.jar configure" to create a configuration file
4.- Execute "java -jar HCB.jar start configuration_file.properties" to perform backup

How to use

java -jar HCB.jar
java -jar HCB.jar start
java -jar HCB.jar start hcb_mysql_s3.properties
java -jar HCB.jar configure
java -jar HCB.jar configure 8888

Configuration

Configuration database example

Database configuration

AWS S3 configuration

aws s3 configuration

Create access and secret key

https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html#Using_CreateAccessKey

Azure Blob configuration

azure blob configuration

Get Azure Blob keys

https://docs.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage?tabs=azure-portal

Google Cloud Storage configuration

gcs configuration

Create Google Cloud Storage credentials

https://cloud.google.com/docs/authentication/getting-started

Write batch script

SET mydate=%DATE%
SET mydate=%mydate:/=-%

SET logFile=C:\Apps\hcb\hcb_%mydate%.log
SET jarFile=C:\Apps\hcb\HCB.jar
SET cnfFile=C:\Apps\hcb\sqlserver.properties

java -Xms256M -Xmx1G -jar %jarFile% start %cnfFile% >> %logFile%

Write bash script

#!/bin/bash

logFile=/home/centos/hcb/hcb_$(date +%d-%m-%Y).log
jarFile=/home/centos/hcb/HCB.jar
cnfFile=/home/centos/hcb/mysql.properties

java -Xms256M -Xmx1G -jar ${jarFile} start ${cnfFile} >> ${logFile}

Backup types

MySQL Dump

For check mysqldump, execute.

mysqldump --help

https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html

MySQL Pump

For check mysqlpump, execute.

mysqlpump --help

https://dev.mysql.com/doc/refman/5.7/en/mysqlpump.html

Percona XtraBackup 2.4

For check innobackupex, execute.

innobackupex --help

https://www.percona.com/doc/percona-xtrabackup/2.4/index.html

Oracle Data Pump

For check expdp, execute.

expdp help=y

https://oracle-base.com/articles/10g/oracle-data-pump-10g

PostgreSQL PgDump

For check pg_dump, execute.

pg_dump --help

https://www.postgresql.org/docs/10/app-pgdump.html

MongoDump

For check mongodump, execute.

mongodump --help

https://docs.mongodb.com/v3.6/reference/program/mongodump/

Percona XtraBackup 8-0

For check xtrabackup, execute.

xtrabackup --help

https://www.percona.com/doc/percona-xtrabackup/8.0/index.html

Notes

The default properties file is hcb.properties and the default port is 10080.

For MySQL backups must be accesible mysqldump, mysqlpump, innobackupex or xtrabackup tools.

For Oracle backups must be accesible expdp (Oracle Data Pump).

For PostgreSQL backups must be accesible pg_dump tool.

For MongoDb backups must be accesible mongodump tool.

P.D. Let's go play !!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.