Giter Club home page Giter Club logo

Comments (7)

jchia avatar jchia commented on May 28, 2024

Isn't that accomplished just by copying the database.json file?

from microbin.

AuthorShin avatar AuthorShin commented on May 28, 2024

@jchia Is it the recommended way? I mean yeah for sure I can do that but what if they change the data structure and the next version won't be able to read the previous version database and just erase it like what happened in here #119.

from microbin.

jchia avatar jchia commented on May 28, 2024

@AuthorShin IDK if there is a recommended way. I run microbin in docker so for backing up I just backup the entire docker volume to a backup location beyond the reach of microbin using operations on the host machine. Why wouldn't backing up the entire data directory work even if not running microbin in docker?

microbin has no idea where you want to backup. E.g. if you want microbin to backup to S3, then microbin would need to know how to interface with S3. This way microbin would need code for all kind of backup backend, so I don't think backing up is the job of microbin. It just needs to clearly specify where all the data lives and backing up is simply accomplished by copying the files while microbin is not running.

I believe all the data just lives in ./pasta_data so manually backing up that directory while microbin is not running should be enough and if not then there is a bug.

from microbin.

AuthorShin avatar AuthorShin commented on May 28, 2024

It's dead simple to add a backup and restore button to the app that if you press backup it will generate a .json file for you and when you need to restore it just press restore and it will ask for the .json file and you just locate the file and it will restore it for you, that's all no S3 or whatever.

from microbin.

jchia avatar jchia commented on May 28, 2024

I'm just saying that there are different forms of backup that people may want to do:

  • backup to S3 or some other cloud location
  • backup from microbin running in a docker container to somewhere outside the container on the host machine
  • backup from microbin running on one machine to another machine
  • the backup you asked for, which is just copying a file

If I understand you correctly, what you are asking for is a button just to copy a file, privileging the last kind of backup over the other kinds.

What I fail to understand is how a "copy file" button will be easier to use than copying the file from the command-line. After you press the button, you still need to know where to find the copy; this is not easier than finding the original file directly and doing whatever copying is needed. Additionally, who has the right to do this? Regular users should not be able to do this from a regular microbin webpage. That then brings up questions about authorization, a can of worms that microbin has not had to deal with so far.

If your concern is format compatibility between microbin versions, then it's a different matter.

from microbin.

AuthorShin avatar AuthorShin commented on May 28, 2024

If your concern is format compatibility between microbin versions, then it's a different matter.

It's all I'm talking about and maybe the solution for it is sort of a universal import/export by microbin itself to eliminate any possible incompatibility in any environment.

from microbin.

jchia avatar jchia commented on May 28, 2024

OK, then this issue is predicated on the existence of format incompatibility between microbin versions. IDK yet whether incompatibility issues exist. Maybe someone more familiar with the format can comment.

In any case, I think this issue would interact with #4.

from microbin.

Related Issues (20)

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.