You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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.
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.
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?
@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
Activity
jesperpedersen commentedon Jul 18, 2022
We need a basic
doc/SSH.mdthat 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.
[pgmoneta#77] Adding a remote backup
[pgmoneta#77] Adding a remote backup
[pgmoneta#77] Adding a remote backup
[pgmoneta#77] Adding a remote backup
[pgmoneta#77] Adding a remote backup
[pgmoneta#77] Adding a remote backup
[pgmoneta#77] Adding a remote backup
[pgmoneta#77] Adding a remote backup
[pgmoneta#77] Adding a remote backup
[pgmoneta#77] Adding a remote backup
[pgmoneta#77] Adding a remote backup
[pgmoneta#77] Adding a remote backup
14 remaining items
jchrys commentedon May 26, 2025
@jesperpedersen Sure, I'd love to work on this.
jesperpedersen commentedon May 26, 2025
@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
jesperpedersen commentedon May 26, 2025
@MariamFahmy98 If you have time, share with @jchrys please
jesperpedersen commentedon Sep 9, 2025
@jchrys Still interested ?
jchrys commentedon Sep 9, 2025
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.
jesperpedersen commentedon Sep 9, 2025
@jchrys Great, thank you
jchrys commentedon Sep 28, 2025
quick update: I’m on this issue, reviewing the SSH engine/codebase and debugging SSH backup, setup, wal streaming
jesperpedersen commentedon Sep 28, 2025
@jchrys Great, @Jubilee101 is looking at storage engines too - so coordinate, please
Jubilee101 commentedon Oct 4, 2025
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.
jesperpedersen commentedon Oct 29, 2025
@jchrys Did you find some good ideas to proceed on ?
jchrys commentedon Nov 3, 2025
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/keydefault 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 newssh_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?
jesperpedersen commentedon Nov 3, 2025
@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_inputwithworker_inputas its base structjesperpedersen commentedon Nov 3, 2025
@jchrys You are on the right track
jchrys commentedon Nov 4, 2025
Thanks :D
I’ll start by making SSH key paths configurable.