Code Monkey home page Code Monkey logo

Comments (11)

KenKundert avatar KenKundert commented on August 25, 2024

I have incorporated your pull request, but I cannot help but thinking we could do better. Shouldn't emborg automatically set prefix for the user? That would require splitting the archive setting in into two settings, perhaps archive_prefix and archive. Or perhaps archive can be converted into the prefix and I just always add {{now}} to the end of whatever is specified. What do you think?

from emborg.

KenKundert avatar KenKundert commented on August 25, 2024

If not specified, the archive setting is now derived from the prefix setting. If neither is specified then prefix defaults to '{config_name}-'.

from emborg.

kewlfft avatar kewlfft commented on August 25, 2024
  • prefix Yes it makes sense to go further with the prefix. Then, if I understand well, this could be a breaking change as names will be different without user's intervention in the settings. Just something to be careful about.

  • suffix As far as suffix are concerned, I personnally use {{now:%Y%m%d}}, if implemented it would be good to have the option and not necessarily have {{now}} at the end.

from emborg.

KenKundert avatar KenKundert commented on August 25, 2024

from emborg.

kewlfft avatar kewlfft commented on August 25, 2024

Understood, and I agree let's keep it simple no need for more parameters for the now format.
The prefix will be applied for pruning and not for listing if I understand well, I am fine with that or with another solution but this is just to make sure I get the current implementation.

from emborg.

KenKundert avatar KenKundert commented on August 25, 2024

I have now extended the use of prefix to all the commands that support it, specifically check, delete, info, list, mount, and prune. I spent some time refining my changes and the documentation, but I believe I am done for now. So I recommend that you pull the latest version (1.4.4) from github.

from emborg.

kewlfft avatar kewlfft commented on August 25, 2024

very good, then is it now still possible to list all the archives of the repo without the prefix?

Also, I would have thought that the default prefix would be the hostname: a config can be copied on several hosts and backup on the same repo using their hostname as a prefix without overlapping.

from emborg.

KenKundert avatar KenKundert commented on August 25, 2024

I can add a --all option that blocks the --prefix option, meaning that list would list all archives. Is this something that would be useful for all commands that use --prefix. Seems like it would be.

I can change the default prefix to hostname.

from emborg.

kewlfft avatar kewlfft commented on August 25, 2024

Yes I think -all would be useful for all commands with prefix, to be used with caution for pruning but this is user's responsibility, the ability to do it makes sense.

default prefix: to make sure I am not making a wrong interpretation, I have checked again the Borg quickstart and they use '{hostname}-' as an example. It makes sense to use it this way as a default.

Use the prune subcommand to maintain 7 daily, 4 weekly and 6 monthly
archives of THIS machine. The '{hostname}-' prefix is very important to
limit prune's operation to this machine's archives and not apply to
other machines' archives also:
borg prune
--list
--prefix '{hostname}-'
--show-rc
--keep-daily 7
--keep-weekly 4
--keep-monthly 6 \

from emborg.

KenKundert avatar KenKundert commented on August 25, 2024

Okay, I will add the --all option.

On the default prefix, Borg does not have the concept of a config, so I don't think we can use the Borg documentation too literally. I am beginning to think that the safest thing to do is to use the following as the default prefix: '{host_name}-{user_name}-{config_name}-'. That way there is almost no chance of a conflict.

from emborg.

KenKundert avatar KenKundert commented on August 25, 2024

Okay, I have updated emborg to version 1.4.5. I implemented the --all option as --include-external (I reserved --all for the mount command) and I changed the default prefix so that it includes the host name, the user name, and the config name.

from emborg.

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.