Code Monkey home page Code Monkey logo

walrus's Introduction

Walrus

Fast, Secure and Reliable System Backup, Set up in Minutes.


Dashboard Screenshots

Walrus is a fast, secure and reliable backup system suitable for modern infrastructure. With walrus, you can backup services like SQLite, MySQL, PostgreSQL, Redis, etcd or a complete directory with a short interval and low overhead. It supports AWS S3, digitalocean spaces and any S3-compatible object storage service.

Documentation

Deployment

Download the latest walrus binary. Make it executable from everywhere.

$ export WALRUS_LATEST_VERSION=$(curl --silent "https://api.github.com/repos/Clivern/Walrus/releases/latest" | jq '.tag_name' | sed -E 's/.*"([^"]+)".*/\1/' | tr -d v)

$ curl -sL https://github.com/Clivern/Walrus/releases/download/v{$WALRUS_LATEST_VERSION}/walrus_{$WALRUS_LATEST_VERSION}_Linux_x86_64.tar.gz | tar xz

Then install etcd cluster or single node, please refer to etcd docs or bin directory inside this repository.

Run Walrus Tower:

Create the tower configs file tower.config.yml from config.dist.yml. Something like the following:

Please make sure to update the apiKey and encryptionKey to a different random values.

# Tower configs
tower:
    # Env mode (dev or prod)
    mode: ${WALRUS_APP_MODE:-dev}
    # HTTP port
    port: ${WALRUS_API_PORT:-8000}
    # URL
    url: ${WALRUS_API_URL:-http://127.0.0.1:8000}
    # TLS configs
    tls:
        status: ${WALRUS_API_TLS_STATUS:-off}
        pemPath: ${WALRUS_API_TLS_PEMPATH:-cert/server.pem}
        keyPath: ${WALRUS_API_TLS_KEYPATH:-cert/server.key}

    # API Configs
    api:
        key: ${WALRUS_API_KEY:-6c68b836-6f8e-465e-b59f-89c1db53afca}
        encryptionKey: ${WALRUS_ENCRYPTION_KEY:-B?E(H+Mb}

    # Async Workers
    workers:
        # Queue max capacity
        buffer: ${WALRUS_WORKERS_CHAN_CAPACITY:-5000}
        # Number of concurrent workers
        count: ${WALRUS_WORKERS_COUNT:-4}

    # Runtime, Requests/Response and Walrus Metrics
    metrics:
        prometheus:
            # Route for the metrics endpoint
            endpoint: ${WALRUS_METRICS_PROM_ENDPOINT:-/metrics}

    # Application Database
    database:
        # database driver
        driver: ${WALRUS_DB_DRIVER:-etcd}

        etcd:
            # etcd database name or prefix
            databaseName: ${WALRUS_DB_ETCD_DB:-walrus}
            # etcd username
            username: ${WALRUS_DB_ETCD_USERNAME:- }
            # etcd password
            password: ${WALRUS_DB_ETCD_PASSWORD:- }
            # etcd endpoints
            endpoints: ${WALRUS_DB_ETCD_ENDPOINTS:-http://127.0.0.1:2379}
            # Timeout in seconds
            timeout: 30

    # Log configs
    log:
        # Log level, it can be debug, info, warn, error, panic, fatal
        level: ${WALRUS_LOG_LEVEL:-info}
        # output can be stdout or abs path to log file /var/logs/walrus.log
        output: ${WALRUS_LOG_OUTPUT:-stdout}
        # Format can be json
        format: ${WALRUS_LOG_FORMAT:-json}

The run the tower with systemd

walrus tower -c /path/to/tower.config.yml

Run Walrus Agent:

Create the agent configs file agent.config.yml from config.dist.yml. Something like the following:

# Agent configs
agent:
    # Env mode (dev or prod)
    mode: ${WALRUS_APP_MODE:-dev}
    # HTTP port
    port: ${WALRUS_API_PORT:-8001}
    # URL
    url: ${WALRUS_API_URL:-http://127.0.0.1:8001}
    # TLS configs
    tls:
        status: ${WALRUS_API_TLS_STATUS:-off}
        pemPath: ${WALRUS_API_TLS_PEMPATH:-cert/server.pem}
        keyPath: ${WALRUS_API_TLS_KEYPATH:-cert/server.key}

    # API Configs
    api:
        key: ${WALRUS_API_KEY:-56e1a911-cc64-44af-9c5d-8c7e72ec96a1}

    # Async Workers
    workers:
        # Queue max capacity
        buffer: ${WALRUS_WORKERS_CHAN_CAPACITY:-5000}
        # Number of concurrent workers
        count: ${WALRUS_WORKERS_COUNT:-4}

    # Tower Configs
    tower:
        url: ${WALRUS_TOWER_URL:-http://127.0.0.1:8000}
        # This must match the one defined in tower config file
        apiKey: ${WALRUS_TOWER_API_KEY:-6c68b836-6f8e-465e-b59f-89c1db53afca}
        # This must match the one defined in tower config file
        encryptionKey: ${WALRUS_ENCRYPTION_KEY:-B?E(H+Mb}
        # Time interval between agent ping checks
        pingInterval: ${WALRUS_CHECK_INTERVAL:-60}

    # Backup settings
    backup:
        tmpDir: ${WALRUS_BACKUP_TMP_DIR:-/tmp}

    # Log configs
    log:
        # Log level, it can be debug, info, warn, error, panic, fatal
        level: ${WALRUS_LOG_LEVEL:-info}
        # output can be stdout or abs path to log file /var/logs/walrus.log
        output: ${WALRUS_LOG_OUTPUT:-stdout}
        # Format can be json
        format: ${WALRUS_LOG_FORMAT:-json}

The run the agent with systemd

walrus agent -c /path/to/agent.config.yml

Now you can open the walrus tower dashboard http://127.0.0.1:8000 and start the setup.

To run the Admin Dashboard (Development Only):

Clone the project or your own fork:

$ git clone https://github.com/Clivern/Walrus.git

Create the dashboard config file web/.env from web/.env.dist. Something like the following:

VUE_APP_TOWER_URL=http://localhost:8080

Then you can either build or run the dashboard

# Install npm packages
$ cd web
$ npm install
$ npm install -g npx

# Add tower url to frontend
$ echo "VUE_APP_TOWER_URL=http://127.0.0.1:8000" > .env

$ cd ..

# Validate js code format
$ make check_ui_format

# Format UI
$ make format_ui

# Run Vuejs app
$ make serve_ui

# Build Vuejs app
$ make build_ui

# Package the Vuejs app
$ make package

Versioning

For transparency into our release cycle and in striving to maintain backward compatibility, Walrus is maintained under the Semantic Versioning guidelines and release process is predictable and business-friendly.

See the Releases section of our GitHub project for changelogs for each release version of Walrus. It contains summaries of the most noteworthy changes made in each release.

Bug tracker

If you have any suggestions, bug reports, or annoyances please report them to our issue tracker at https://github.com/clivern/walrus/issues

Security Issues

If you discover a security vulnerability within Walrus, please send an email to [email protected]

Contributing

We are an open source, community-driven project so please feel free to join us. see the contributing guidelines for more details.

License

ยฉ 2020, Clivern. Released under MIT License.

Walrus is authored and maintained by @clivern.

walrus's People

Contributors

bossbossk20 avatar butuzov avatar chrl avatar clivern avatar dependabot[bot] avatar hecorr avatar hyeio avatar renovate-bot avatar renovate[bot] avatar stack-file[bot] avatar taraio avatar todd-the-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

walrus's Issues

PostgreSQL Backup Support

PostgreSQL Backup Support

// TODO PostgreSQL Backup Support

	// BackupRedis constant
	// TODO Redis Backup Support
	BackupRedis = "@BackupRedis"

	// BackupPostgreSQL constant
	// TODO PostgreSQL Backup Support
	BackupPostgreSQL = "@BackupPostgreSQL"

	// BackupEtcd constant
	// TODO Etcd Backup Support
	BackupEtcd = "@BackupEtcd"

	// BackupSQLite constant
	// TODO SQLite Backup Support
	BackupSQLite = "@BackupSQLite"
)

// Request type
ndex 8332d4f..d900188 100644
++ b/web/package.json

e1e5e742aec861576f3439c9c2a3c04566972a84

Windows Support

Is your feature request related to a problem? Please describe.
A Windows binary is not available con Releases

Describe the solution you'd like
Create a binary release for the agent service for Windows.

Etcd Backup Support

Etcd Backup Support

// TODO Etcd Backup Support

	// TODO Redis Backup Support
	BackupRedis = "@BackupRedis"

	// BackupPostgreSQL constant
	// TODO PostgreSQL Backup Support
	BackupPostgreSQL = "@BackupPostgreSQL"

	// BackupEtcd constant
	// TODO Etcd Backup Support
	BackupEtcd = "@BackupEtcd"

	// BackupSQLite constant
	// TODO SQLite Backup Support
	BackupSQLite = "@BackupSQLite"
)

// Request type
ndex 8332d4f..d900188 100644
++ b/web/package.json

36a1011308a307390d2dce9a7320df71969f091f

Docker Volume Backup Support

Docker Volume Backup Support

// TODO Docker Volume Backup Support

	BackupEtcd = "@BackupEtcd"

	// BackupDockerVolume constant
	// TODO Docker Volume Backup Support
	BackupDockerVolume = "@BackupDockerVolume"

	// BackupSQLite constant
	BackupSQLite = "@BackupSQLite"
)
ew file mode 100644
ndex 0000000..f90d989
++ b/deployment/docker-compose/README.md

0112e096df3ecf28ae99b2fc30fc500b7bbd664f

Encryption at rest

Is your feature request related to a problem? Please describe.

This is not related to a problem.

Describe the solution you'd like

I'm just curious if the data is encrypted client side before the backup is moved into object storage (like restic does)?

Additional context

I'm just trying to understand how the backups are stored as I didn't find it in the documentation.

Thank you for your time.

PostgreSQL Backup Support

PostgreSQL Backup Support

// TODO PostgreSQL Backup Support

	// BackupRedis constant
	// TODO Redis Backup Support
	BackupRedis = "@BackupRedis"

	// BackupPostgreSQL constant
	// TODO PostgreSQL Backup Support
	BackupPostgreSQL = "@BackupPostgreSQL"

	// BackupEtcd constant
	// TODO Etcd Backup Support
	BackupEtcd = "@BackupEtcd"

	// BackupSQLite constant
	// TODO SQLite Backup Support
	BackupSQLite = "@BackupSQLite"
)

// Request type

54b9dbda48e25c9d9f65df5572588f48240f9bd3

SQLite Backup Support

SQLite Backup Support

// TODO SQLite Backup Support

	BackupRedis = "@BackupRedis"

	// BackupPostgreSQL constant
	// TODO PostgreSQL Backup Support
	BackupPostgreSQL = "@BackupPostgreSQL"

	// BackupEtcd constant
	// TODO Etcd Backup Support
	BackupEtcd = "@BackupEtcd"

	// BackupSQLite constant
	// TODO SQLite Backup Support
	BackupSQLite = "@BackupSQLite"
)

// Request type

5a32d58a847bb094772b362dc52b0f334d56d407

Hide Secure Data from Logs

Hide Secure Data from Logs

// TODO Hide Secure Data from Logs

// Logger middleware
// TODO Hide Secure Data from Logs
func Logger() gin.HandlerFunc {
	return func(c *gin.Context) {
		// before request
ndex 8332d4f..d900188 100644
++ b/web/package.json

a8a7cf1ec350fa93b460409950dfe89b71325d4b

consider the case where bucket is missing and it fails to create

consider the case where bucket is missing and it fails to create

// TODO consider the case where bucket is missing and it fails to create

	// Create bucket if not exist (ignore error)
	// TODO consider the case where bucket is missing and it fails to create
	m.S3.CreateBucket(message.Settings["backup_s3_bucket"])

	// Upload to S3
ndex 71238a6..e242919 100644
++ b/core/middleware/log.go

0cef40e469ac71cd41907ee3fccfb084233974fe

Redis Backup Support

Redis Backup Support

// TODO Redis Backup Support

	// BackupRedis constant
	// TODO Redis Backup Support
	BackupRedis = "@BackupRedis"

	// BackupPostgreSQL constant
	// TODO PostgreSQL Backup Support
	BackupPostgreSQL = "@BackupPostgreSQL"

	// BackupEtcd constant
	// TODO Etcd Backup Support
	BackupEtcd = "@BackupEtcd"

	// BackupSQLite constant
	// TODO SQLite Backup Support
	BackupSQLite = "@BackupSQLite"
)

// Request type

1baafab38d8eca79e87345cc085f433b8a2aa318

Docker Volume Backup Support

Docker Volume Backup Support

// TODO Docker Volume Backup Support

	BackupEtcd = "@BackupEtcd"

	// BackupDockerVolume constant
	// TODO Docker Volume Backup Support
	BackupDockerVolume = "@BackupDockerVolume"

	// BackupSQLite constant
	BackupSQLite = "@BackupSQLite"
)
ew file mode 100644
ndex 0000000..f90d989
++ b/deployment/docker-compose/README.md

26f02c88a75b2ce570a319f3d1328263cd2a4e0c

Etcd Backup Support

Etcd Backup Support

// TODO Etcd Backup Support

	// TODO Redis Backup Support
	BackupRedis = "@BackupRedis"

	// BackupPostgreSQL constant
	// TODO PostgreSQL Backup Support
	BackupPostgreSQL = "@BackupPostgreSQL"

	// BackupEtcd constant
	// TODO Etcd Backup Support
	BackupEtcd = "@BackupEtcd"

	// BackupSQLite constant
	// TODO SQLite Backup Support
	BackupSQLite = "@BackupSQLite"
)

// Request type

03ee3ae3314e4da1081c192ba29f674be967c09f

Support non-S3 path (MinIO-like)

Is your feature request related to a problem? Please describe.
I've tested the farthest that I was able to - but I couldn't get MinIO to work with Walrus - after loads of debug (public/download policies, IP/port change, new access key/secret, etc, I was not able to use MinIO with Walrus.

I was also not able to find the reason why on the logs - but if you advise me how to find, I'll try my head to send it all here and send you.

Describe the solution you'd like
MinIO, by default, uses:
hostname.tld/bucket-name/object-name, while S3 uses something like bucket-name.hostname.tld/object-name.

Thus, a great way would be to add a switch or a case, if possible, for both situations.

If I'm mistaken, I'm looking forward to correct soon enough - and also contribute to the project if possible! ๐Ÿ˜„

Redis Backup Support

Redis Backup Support

// TODO Redis Backup Support

	// BackupRedis constant
	// TODO Redis Backup Support
	BackupRedis = "@BackupRedis"

	// BackupPostgreSQL constant
	// TODO PostgreSQL Backup Support
	BackupPostgreSQL = "@BackupPostgreSQL"

	// BackupEtcd constant
	// TODO Etcd Backup Support
	BackupEtcd = "@BackupEtcd"

	// BackupSQLite constant
	// TODO SQLite Backup Support
	BackupSQLite = "@BackupSQLite"
)

// Request type
ndex 8332d4f..d900188 100644
++ b/web/package.json

dcc120983beb37be6900d4d9ebca7bbae8737648

More documentation, examples and screenshots

Hi, I just randomly discovered this project and at first sight it looks super interesting! However, it would be cool to have some more details on what Walrus is actually capable of, how to configure it and a few more screenshots of the admin UI. This would help people get a better idea of this tool might be helpful for theit use cases without having to go through the whole setup process to create a personal demo instance.

For instance, a few questions that came to my mind browsing the readme include:

  • How does it "look" like to configure new backup jobs of different types, e.g. file system backup, MySQL backup, etc.?
  • Are backups incremental and are they compressed?
  • Can you easily restore backups?
  • Is this project still under active development and what is the roadmap?
  • How does Walrus compare to tools like Restic, Borg, etc.?

Add possibility to run script before doing actual backup

Is your feature request related to a problem? Please describe.
I'm doing backups from MySQL using xtrabackup. I love how Walrus is able to do a tar archive of file, but first I need to create a dump with binlogs by running innobackupex /target/dir/.

Describe the solution you'd like
I'd like to have a field called "Before Script" to be able to run any arbitrary script before doing the actual backup.

Additional context
This can also be helpful for sending notifications that backup has started, or even emails. Or, during local development on my mac, I'd use /usr/bin/osascript -e 'display notification "Backup is starting" with title "Walrus" sound name "Submarine"' to show notification in Notification Center. Actually lots of usecases.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

docker-compose
deployment/docker-compose/docker-compose.yml
  • docker.io/bitnami/etcd 3-debian-10
dockerfile
Dockerfile
  • golang 1.21.3-alpine
github-actions
.github/workflows/api.yml
  • actions/checkout v4
  • actions/setup-go v3
.github/workflows/release.yml
  • actions/checkout v4
  • actions/setup-go v3
  • goreleaser/goreleaser-action v4
.github/workflows/release_package.yml
  • actions/checkout v4
  • actions/setup-go v3
.github/workflows/todo.yml
  • alstr/todo-to-issue-action v4.12.3
.github/workflows/ui.yml
  • actions/checkout v4
  • actions/cache v3
  • actions/setup-node v4
gomod
go.mod
  • go 1.20
  • github.com/aws/aws-sdk-go v1.51.17
  • github.com/drone/envsubst v1.0.3
  • github.com/franela/goblin v0.0.0-20211003143422-0a4f594942bf@0a4f594942bf
  • github.com/gin-gonic/gin v1.9.1
  • github.com/prometheus/client_golang v1.18.0
  • github.com/satori/go.uuid v1.2.0
  • github.com/sirupsen/logrus v1.9.3
  • github.com/spf13/cobra v1.8.0
  • github.com/spf13/viper v1.16.0
  • github.com/stretchr/testify v1.9.0
  • go.etcd.io/etcd/client/v3 v3.5.9
  • golang.org/x/crypto v0.21.0
npm
web/package.json
  • axios 0.28.0
  • buefy 0.9.29
  • core-js 3.36.1
  • vue 2.7.16
  • vue-router 3.6.5
  • vuex 3.6.2
  • @babel/core 7.24.4
  • @babel/eslint-parser 7.24.1
  • @vue/cli-plugin-babel 5.0.8
  • @vue/cli-plugin-eslint 5.0.8
  • @vue/cli-service 5.0.8
  • eslint 8.57.0
  • eslint-plugin-vue 9.23.0
  • vue-template-compiler 2.7.16

  • Check this box to trigger a request for Renovate to run again on this repository

Local filesystem support

It would be nice to have Walrus backup to the local filesystem for those of us that dont have S3 etc :)

SQLite Backup Support

SQLite Backup Support

// TODO SQLite Backup Support

	BackupRedis = "@BackupRedis"

	// BackupPostgreSQL constant
	// TODO PostgreSQL Backup Support
	BackupPostgreSQL = "@BackupPostgreSQL"

	// BackupEtcd constant
	// TODO Etcd Backup Support
	BackupEtcd = "@BackupEtcd"

	// BackupSQLite constant
	// TODO SQLite Backup Support
	BackupSQLite = "@BackupSQLite"
)

// Request type
ndex 8332d4f..d900188 100644
++ b/web/package.json

28820464674ef60050a0f017dc86e4ddb70fce6a

Docker Volume Backup Support

Docker Volume Backup Support

// TODO Docker Volume Backup Support

	BackupEtcd = "@BackupEtcd"

	// BackupDockerVolume constant
	// TODO Docker Volume Backup Support
	BackupDockerVolume = "@BackupDockerVolume"

	// BackupSQLite constant
	BackupSQLite = "@BackupSQLite"
)
ew file mode 100644
ndex 0000000..b3f64de
++ b/deployment/docker-compose/README.md

7664f8ac8a1867b175d3d4cec9958bdc38577429

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.