Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selective restoration of IMAP folders #139

Merged
merged 8 commits into from
Dec 6, 2024
Merged

Selective restoration of IMAP folders #139

merged 8 commits into from
Dec 6, 2024

Conversation

DavidePrincipi
Copy link
Member

  • The IMAP folder list is saved in the backup for each Mail user
  • Action seek-snapshot-contents allows to search the IMAP folder list of a given user from a past backup snapshot
  • Action restore-backup-content creates a "Restored folder" under the user's IMAP tree, extracts the selected folder from backup and puts it under "Restored folder".

Refs NethServer/dev#7072

The mailbox list is needed to quickly find an IMAP folder path inside
a given backup snapshot. Maildir path-encoding format can be obtained
with the "doveadm mailbox path" command.
- Require core 3.3.0+
- Obtain the IMAP folder list for the selected user from a backup
  snapshot
- Retrieve the partial backup from Restic.
- Import data into user's Maildir.
- Disable quota if limit is exceeded.

Added "restore-folder" command to Dovecot's container, and related
documentation.
@DavidePrincipi DavidePrincipi self-assigned this Nov 13, 2024
@DavidePrincipi DavidePrincipi changed the title Backend actions for selective restoration of IMAP folders Selective restoration of IMAP folders Nov 13, 2024
Copy link
Contributor

@andre8244 andre8244 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of typos. Didn't understand every single line but overall it LGTM 🙈

dovecot/usr/local/bin/restore-folder Outdated Show resolved Hide resolved
@DavidePrincipi
Copy link
Member Author

TODO: test the Public folder restoration

The Public mailbox is restored into itself, as a subdir of "Restore
folder".
Use agent.run_restic() to capture progress. The agent.run_restic() can
now capture the JSON output by itself and invoke a callback function.

The same function can intercept the last JSON message from Restic and
return it in the action output.
@DavidePrincipi DavidePrincipi merged commit 92f2b02 into main Dec 6, 2024
5 checks passed
@DavidePrincipi DavidePrincipi deleted the feat-7072 branch December 6, 2024 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants