Can’t really say it’s been that long… but we’re back with exciting new features 😄
What’s an integration ?
Integrations in plakar
are designed to make backups easier by extending its ability to handle new resources.
They can:
- Provide storage connectors (e.g. host a Kloset store on S3, FS, etc.)
- Provide source connectors (e.g. import from FTP, IMAP, local FS…)
- Provide destination connectors (e.g. restore to SFTP, IMAP, etc.)
You can mix and match them however you like.
Backup your local filesystem to S3, restore it to a remote SFTP — no sweat.
Bonus: We plan to expand integrations even further — think snapshot data analyzers (GDPR tagging, email detection…), custom data viewers (SQL query explorers!), and more.
Integrations are intentionally lightweight — some of ours were built in under an hour with fewer than 100 lines of Go.
We’re committed to keeping the barrier to entry low, so anyone can create their own with ease — whether you’re contributing open source integrations to help grow the plakar ecosystem, or building commercial ones to monetize your work.
Attention
This feature only works on our development branch for the time being, you can give it a try by installing our latest devel release:
$ go install github.com/PlakarKorp/plakar@v1.0.3-devel.455ca52
Introducing go-kloset-sdk
We’ve made writing integrations simple — but handling the underlying plumbing for plugins (like GRPC over socketpairs, IPC management, and process orchestration)… not so much. It’s messy, error-prone, and frankly, not something most developers want to deal with.
That’s where go-kloset-sdk
steps in.
This SDK abstracts all the hard parts. It lets you:
- Write integrations exactly like the builtins
- Package them as standalone plugins with no boilerplate
- Convert existing builtins into plugins effortlessly
It’s still evolving (interface changes may happen), but you can use it right now to build powerful plugins without the headache.
Writing an Integration: Quick Guide
We’ll keep it short — docs are available and maintained — but here’s the big picture.
1. Implement the Connector Interface
Example: A simple FTP source connector:
1func NewFTPImporter(...) (importer.Importer, error)
2func (p *FTPImporter) Close() error
3
4// produce the full list of resources to backup
5func (p *FTPImporter) Scan() (<-chan *importer.ScanResult, error)
6
7// provide a ReadCloser to a specific ressource
8func (p *FTPImporter) NewReader(string) (io.ReadCloser, error)
That’s really it. Connect to the resource, expose the data.
2. Implement the Connector Interface
Second step is to write a main.go
that registers the implementation to the SDK:
1package main
2
3import (
4 "fmt"
5 "os"
6
7 "github.com/PlakarKorp/go-kloset-sdk/sdk"
8 "github.com/PlakarKorp/integration-ftp/importer"
9)
10
11func main() {
12 if len(os.Args) != 1 {
13 fmt.Printf("Usage: %s\n", os.Args[0])
14 os.Exit(1)
15 }
16
17 err := sdk.RunImporter(importer.NewFTPImporter);
18 if err != nil {
19 panic(err)
20 }
21}
3. Describe it in a Manifest
1name: ftp
2description: ftp importer
3version: 0.1.0
4connectors:
5- type: importer
6 executable: ftpImporter
7 homepage: https://github.com/PlakarKorp/integration-ftp
8 license: ISC
9 protocols: [ftp]
4. Build the Package
$ go build -o ftpImporter ./plugin/importer
$ plakar pkg create manifest.yaml
You’ll get a ftp-v0.1.0.ptar
you can install:
$ plakar pkg add ftp-v0.1.0.ptar
And voilà — ftp://
becomes a fully-supported import source in your setup.
Say Hello to the IMAP Integration
To celebrate the SDK release, we’re also launching a new IMAP integration!
It’s still early-stage and doesn’t yet support custom AUTH providers, but it already lets you:
Backup your email:
$ plakar source add IMAPsrc imap://imap.mydomain.com:143 \
username=myuser password=mypassword tls=starttls
$ plakar backup @IMAPsrc
Restore your email:
$ plakar destination add IMAPdst imap://imap.alsomydomain.com:143 \
username=alsomyuser password=alsomypassword tls=starttls
$ plakar restore -to @IMAPdst <snapid>
Full instructions are available in the integration’s README — we’d love your feedback!
What’s next ?
We’re not done yet — this is just the start.
Expect two more integrations this week, and more in the coming weeks. We already know what’s dropping tomorrow and Friday… but we’re keeping it a surprise for now 😏
⭐ Star us on GitHub, join our community on Discord, and be part of shaping the future of plakar.
See you tomorrow!
— The Plakar Team