Code Monkey home page Code Monkey logo

lifeboat's People

Contributors

a-mesin avatar dependabot[bot] avatar florianrusch avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

lifeboat's Issues

Exclude files while doing a filesystem backup

If the user wants to backup a folder from the filesystem, we should provide him the possibility to exclude certain files.
A good practice would be a list of regex paths which should be ignored.

We could also think of a .lifeboatignore file. This file wouldn't make sense in terms of backing up the files of another application, but e.g. if a user wants to backup his local PC it would be a great feature.

Possibility to exchange metadata from source to destination

We need a way to provide the destination resource metadata/contextual data from the source resource.

Example use case

filesystem -> filesystem backup where the target file should be named just like the source file suffixed with a user specified string f.e. timestamp.

Rough idea for the implementation

Instead of running the io.Copy directly in the backup command we introduce a new struct (f.e. called BackupProcessor) which takes in the reader and writer for the io.Copy function and in addition to that arbitrary metadata (maybe a map[string]any or we even can decide on a fixed set of possible metadata for each destination type?) and populates the writer with that metadata before running the io.Copy

Provide basic setup for dynamic type-based configurations

We aim to provide support for various resource types (such as sources and destinations), each requiring distinct configurations. Nevertheless, we strive to keep the setup process effortless. Therefore, our proposal is to specify the resource type and the associated configuration at the same level.

For example, the configuration should look something like the following:

source:
  type: filesystem
  path: /take-my-backup-from-here

destination:
  type: filesystem
  path: /store-the-backup-here

The type field indicates the resource type (e.g. filesystem, http, postgresql, mongodb, hashicorp vault, ...). Everything else will be the configuration of the respective resource.

Should we drop the destination file if backup was not successful?

When adding support for new systems, I also test the negative paths: for example, what happens if the HashiCorp Vault token doesn't have the required permissions or isn't valid at all.

During these tests, due to my oversight in changing the path, I often get an error message saying that the target file already exists.

This brings up the question of whether the destination file should be deleted if the backup process fails. In my opinion, there is no reason to keep it, but I am open to other suggestions.

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.