Giter Club home page Giter Club logo

plakar's Introduction

plakar

THIS IS WORK IN PROGRESS, DO NOT USE IN PLACE OF YOUR REGULAR BACKUPS.

IT IS NOT ALPHA, IT IS NOT EVEN PRE-ALPHA, IT IS PRE-BIGBANG.

DO YOU PLAN TO USE IT ?

  • NO: GOOD, CONTINUE NOT USING IT.
  • YES: PLEASE, DO NOT USE IT.

JUST IN CASE, HERE IS A FLOW CHART TO BETTER EXPLAIN VALID CURRENT USE-CASES:

+-----------------------+        +----+
| SHOULD I USE PLAKAR ? | -----> | NO |
+-----------------------+        +----+

TODO

  • general cleanup as this is my first real Go project

Quickstart

Requirement

plakar requires Go 1.16 or higher, it may work on older versions but hasn't been tested.

Installing the CLI

$ go get github.com/poolpOrg/plakar/cmd/plakar

Creating a plakar repository

The next thing to do is to create a plakar repository,

$ plakar create
repository passphrase:
repository passphrase (confirm):
$

It may be desirable to create unencrypted plakar repositories, particularly for the default local plakar, the -no-encryption option may be used in this case:

$ plakar create -no-encryption
$

It is possible to create multiple repositories, simply by providing a path to the plakar create subcommand:

$ plakar on /tmp/plakar.1 create -no-encryption
$

$ plakar on /tmp/plakar.2 create
repository passphrase:
repository passphrase (confirm):
$

ALL of the subcommands below, support working on alternate plakars.

Whenever a non-default plakar is used, it should be noted on the command line with on:

$ plakar on /tmp/plakar.1 push /bin
$ plakar on /tmp/plakar.1 ls
2022-03-21T22:02:17Z  22cd673e    3.1 MB /private/etc
$ 

Pushing snapshots

plakar works by creating a snapshot of filesystem hierarchies and storing them efficiently.

$ plakar push /private/etc
$

Listing snapshots

Available snapshots are identified by UUID identifiers and can be listed:

$ plakar ls
2022-03-21T22:02:17Z  b3bdb2b0    3.1 MB /private/etc
$

Pulling snapshots

Each snapshot can be restored with a single command:

$ plakar pull b3bdb2b0
$ ls -ld private/etc/
drwxr-xr-x  82 gilles  staff  2624  6 Oct 21:48 private/etc/
$

Snapshot ID

Each snapshot is assigned a UUID to allow referencing it in subcommands.

To make it easier for humans, the plakar CLI provides prefix-based lookups so that the UUID does not need to be typed entirely. Whenever a snapshot UUID is expected, a user may provide the first characters and plakar will complete the missing part:

$ plakar ls
2022-03-21T22:02:17Z  b3bdb2b0    3.1 MB /private/etc
$ plakar check b3
$ echo $?
0
$

In case of ambiguity, an error will be emitted to ensure an unambiguous identifier is provided:

$ plakar ls
2022-03-21T22:02:17Z  b3bdb2b0    3.1 MB /private/etc
2022-03-21T22:02:17Z  b68a8f07    3.1 MB /private/etc
$ plakar check b
2022/03/06 21:50:10 plakar: snapshot ID is ambiguous: b (matches 2 snapshots)
$ plakar check b3
$ 

Snapshot path

Commands that refer to a resource inside a snapshot may refer to it using a snapshot-relative path.

These paths must be absolute but are prefixed with the snapshot they are relative to:

$ plakar ls b3:/private/etc/passwd
-rw-r--r--     root    wheel   7.6 kB /private/etc/passwd
$ plakar ls b3:/private/etc/passwd b6:/private/etc/passwd
-rw-r--r--     root    wheel   7.6 kB /private/etc/passwd
-rw-r--r--     root    wheel   7.6 kB /private/etc/passwd
$

For up-to-date informations

For up-to-date informations, you can read the documentation available at https://plakar.io

plakar's People

Contributors

poolporg avatar

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.