Skip to content

Implementing a SSH storage engine. #77

Open

Description

@MariamFahmy98

Implementing a SSH storage engine that supports the following commands:

  • backup: It is used to create a backup for a server.
  • restore: It is used to restore a backup from a server.
  • archive: It is used to archive a backup from a server.
  • delete: It is used to delete a backup from a server.
  • retain: It is used to retain a backup from a server.
  • expunge: It is used to expunge a backup from a server.
  • list-backups: It is used to list the backups for a server.
  • Adding the symlink functionality.

libssh will be used to implement the SSH storage engine, specifically the SFTP api to copy files and directories to the remote system, in addition to deleting backup remote directories.

Activity

  1. jesperpedersen commented on Jul 18, 2022

    @jesperpedersen
    Member

    We need a basic doc/SSH.md that explains how to setup a SSH server, and the requirements needed in order for the SSH storage engine to work.

    Part of this task is also to design how metadata is kept, and where - maybe both locally and remote; with a resync. Maybe we can assume remote management for some commands, but that probably isn't ideal... Lets continue in a forum thread.

  2. added 12 commits that reference this issue on Aug 8, 2022
  3. 14 remaining items

  4. jchrys commented on May 26, 2025

    @jchrys
    Contributor

    @jesperpedersen Sure, I'd love to work on this.

  5. jesperpedersen commented on May 26, 2025

    @jesperpedersen
    Member

    @jchrys Great, maybe you want a forum discussion on it once you have thought about it.

    This is a major project and will help define the architecture of storage modules in general

  6. jesperpedersen commented on May 26, 2025

    @jesperpedersen
    Member

    @MariamFahmy98 If you have time, share with @jchrys please

  7. jesperpedersen commented on Sep 9, 2025

    @jesperpedersen
    Member

    @jchrys Still interested ?

  8. jchrys commented on Sep 9, 2025

    @jchrys
    Contributor

    Hi @jesperpedersen — yes, I’m still interested.
    I let this slip while waiting for prior works to be shared.
    I’ll start the research this weekend. (will open a forum discussion right after)
    Thanks for the reminder and your patience.

  9. jesperpedersen commented on Sep 9, 2025

    @jesperpedersen
    Member

    @jchrys Great, thank you

  10. jchrys commented on Sep 28, 2025

    @jchrys
    Contributor

    quick update: I’m on this issue, reviewing the SSH engine/codebase and debugging SSH backup, setup, wal streaming

  11. jesperpedersen commented on Sep 28, 2025

    @jesperpedersen
    Member

    @jchrys Great, @Jubilee101 is looking at storage engines too - so coordinate, please

  12. Jubilee101 commented on Oct 4, 2025

    @Jubilee101
    Member

    Hi @jchrys , my work won't have much conflicts with yours (hopefully). Just make sure when you design APIs, make it more abstract and as simple as possible (the internal can be as complicated as you need it to be). And remember that we will have cases that the data is written directly through SSH through a buffer, instead of having to read it from a file first.

  13. jesperpedersen commented on Oct 29, 2025

    @jesperpedersen
    Member

    @jchrys Did you find some good ideas to proceed on ?

  14. jchrys commented on Nov 3, 2025

    @jchrys
    Contributor

    Hi, @jesperpedersen
    I have some ideas for improvements but need your advice.
    First thing I'd like to work on is making SSH key paths configurable. currently they're hardcoded, which forces me to use symlinks for testing. Planning to add options like ssh_private_key = /path/to/private/key, ssh_public_key = /path/to/pub/key default to ~/.ssh/id_rsa(.pub) if not speicifed.

    After that, I want to work on parallelizing SSH operations using the workers framework as suggested in above. The thing is they're stateless task executors. So my plan is to create an ssh connection pool in the mainthread and pass it to workers via worker_input ( or maybe a new ssh_worker_input). Then workers would acquire a connection from the pool, do their ssh operations, and release it back.

    Does this approach make sense, or would you suggest a different approach?

  15. jesperpedersen commented on Nov 3, 2025

    @jesperpedersen
    Member

    @jchrys The configurable paths sounds like a good idea - with their defaults. As to the SSH connection pool, just start simple and it can be added later - if it easy to do then do the ssh_worker_input with worker_input as its base struct

  16. jesperpedersen commented on Nov 3, 2025

    @jesperpedersen
    Member

    @jchrys You are on the right track

  17. jchrys commented on Nov 4, 2025

    @jchrys
    Contributor

    Thanks :D
    I’ll start by making SSH key paths configurable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

feature

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions