NethServer / dev

NethServer issue tracker
https://github.com/NethServer/dev/issues
63 stars 18 forks source link

Restore a single file or folder from backup #7072

Open DavidePrincipi opened 1 month ago

DavidePrincipi commented 1 month ago

File server and Mail server store user data as files and folders: a single file or folder restore tool can be useful in case of accidental data removal.

Basic restore workflow:

  1. select the backup destination
  2. select the past backup snapshot (date) to restore
  3. select mail user, or shared folder
  4. select the IMAP folder, subfolder or file to restore

Contents are restored to a separate folder, so the user can access by their side.

It was also requested the procedure to explore a NS8 Restic backup

how to run Restic in another Linux distribution to extract a NS8 application backup? -- https://community.nethserver.org/t/migrate-ns8-applications-to-other-platforms/22251/2?u=davidep

Discussion https://mattermost.nethesis.it/nethesis/pl/x1ooc8ctmiyhjxhbxq1eiz9rch

See also


Sub-tasks:

DavidePrincipi commented 1 month ago

Released restic-wrapper in https://github.com/NethServer/ns8-core/releases/tag/3.1.3

DavidePrincipi commented 3 weeks ago

Restore user's mail folder:

restic-wrapper --backup 1 restore 'eb97369f:volumes/dovecot-data/first.user/Maildir/.Folder.Subfolder' -t '/srv/volumes/dovecot-data/davidep/Maildir/.RestoreTest'

The .RestoreTest directory is created with root:root ownership and must be fixed to vmail:vmail. Directory contents have the correct owner, because they are restored from the backup.

The client (Evolution, Webtop) takes a while before listing the restored folder. I still do not grasp what is the condition that makes it suddenly visible 🤔