Data restore impossible

NethServer Version: 7.9.2009

Hello at all,
I have configured two backup scenarios:

  1. data backup via sft/restic each day
  2. mail backup via sft/restic each our

This morning the server was surprisingly unreachable (no idea why not), and I restored a KVM snapshot from last evening.

The next obvious thing to do was to restore the mails that had been backed up in the meantime.
But the “restore data” module did not provide the hourly backups on the backup server.
How to persuade Nethserver to read existing backups and make them available for restore?
Why doesn’t NS automatically read such existing backup versions?

Sincerely, Marko

cc: @Andy_Wismer

1 Like

I think you need to restore from command line (see also here), the restore-data UI module only works for the backup called backup-data, see docs.

To restore mails:

restore-file -b <BACKUPNAME> / /var/lib/nethserver/vmail/

The restore data user interface can restore all the backups configured from the backup interface.
It reads the list of backups from /var/lib/nethserver/backup/restore/.

1 Like

I read it here.

1 Like

Thanks for clarifying @filippo_carletti

I think best way is to restore the most recent backup to get the newest list of backups. You can do it in the server manager backup page or on command line:

restore-data -b <BACKUPNAME>

Then you should be able to restore via restore data UI.

This may take a long time depending on your backups and to avoid it, Neth saves filelists of the backups locally.

@giacomo has just removed the incorrect documentation. Thanks.

2 Likes

Thank you all,
but I’m not sure hat you really understand the problem.
The backups are located on a remote server. The local NS don’t know anything about the backuped files in the period between the snapshot and the recovery of this snapshot.
The command /sbin/e-smith/backup-data-list -b srv01-bak-mail results only local known backuped files, the interesting remote saved files are not listed.

And btw… how is anyone supposed to identify the mails needed for recovery, with such meaningless output?

Zusammenfassung /var/lib/nethserver/vmail/root/Maildir/new/1616378466.M127520P2911.ns-srv01.xyz.de,S=3708,W=3797 /var/lib/nethserver/vmail/root/Maildir/new/1616378470.M316195P2911.ns-srv01.xyz.de,S=5129,W=5239 /var/lib/nethserver/vmail/root/Maildir/new/1616387203.M944222P8128.ns-srv01.xyz.de,S=2574,W=2628 /var/lib/nethserver/vmail/root/Maildir/new/1616464864.M616707P15990.ns-srv01.xyz.de,S=3708,W=3797 /var/lib/nethserver/vmail/root/Maildir/new/1616464869.M587470P15990.ns-srv01.xyz.de,S=5129,W=5239 /var/lib/nethserver/vmail/root/Maildir/new/1616474025.M305555P24464.ns-srv01.xyz.de,S=2574,W=2628 /var/lib/nethserver/vmail/root/Maildir/new/1616551265.M32737P13051.ns-srv01.xyz.de,S=3708,W=3797 /var/lib/nethserver/vmail/root/Maildir/new/1616551270.M174925P13051.ns-srv01.xyz.de,S=5129,W=5239 /var/lib/nethserver/vmail/root/Maildir/new/1616560262.M747211P21301.ns-srv01.xyz.de,S=2573,W=2627 /var/lib/nethserver/vmail/root/Maildir/new/1616637664.M275743P31102.ns-srv01.xyz.de,S=3708,W=3797 /var/lib/nethserver/vmail/root/Maildir/new/1616637670.M545821P31102.ns-srv01.xyz.de,S=5129,W=5239 /var/lib/nethserver/vmail/root/Maildir/new/1616641123.M485349P14212.ns-srv01.xyz.de,S=2573,W=2627 /var/lib/nethserver/vmail/root/Maildir/new/1616724067.M110186P27036.ns-srv01.xyz.de,S=4369,W=4474 /var/lib/nethserver/vmail/root/Maildir/new/1616724076.M253782P27036.ns-srv01.xyz.de,S=6899,W=7046 /var/lib/nethserver/vmail/root/Maildir/new/1616726675.M954151P7038.ns-srv01.xyz.de,S=2573,W=2627 /var/lib/nethserver/vmail/root/Maildir/subscriptions /var/lib/nethserver/vmail/root/Maildir/tmp /var/lib/nethserver/vmail/shared-mailboxes.db /var/lib/nethserver/vmail/vmail /var/lib/nethserver/vmail/vmail/Maildir /var/lib/nethserver/vmail/vmail/Maildir/.Junk /var/lib/nethserver/vmail/vmail/Maildir/.Junk/cur /var/lib/nethserver/vmail/vmail/Maildir/.Junk/dovecot-acl /var/lib/nethserver/vmail/vmail/Maildir/.Junk/dovecot-uidlist /var/lib/nethserver/vmail/vmail/Maildir/.Junk/dovecot.index.log /var/lib/nethserver/vmail/vmail/Maildir/.Junk/maildirfolder /var/lib/nethserver/vmail/vmail/Maildir/.Junk/new /var/lib/nethserver/vmail/vmail/Maildir/.Junk/tmp /var/lib/nethserver/vmail/vmail/Maildir/cur /var/lib/nethserver/vmail/vmail/Maildir/dovecot-acl /var/lib/nethserver/vmail/vmail/Maildir/dovecot-acl-list /var/lib/nethserver/vmail/vmail/Maildir/dovecot-uidlist /var/lib/nethserver/vmail/vmail/Maildir/dovecot-uidvalidity /var/lib/nethserver/vmail/vmail/Maildir/dovecot-uidvalidity.5f7fc480 /var/lib/nethserver/vmail/vmail/Maildir/dovecot.index.log /var/lib/nethserver/vmail/vmail/Maildir/new /var/lib/nethserver/vmail/vmail/Maildir/tmp /var/lib/nethserver/vmail/vmail@xyz.de /var/lib/nethserver/vmail/vmail@xyz.de/Maildir /var/lib/nethserver/vmail/vmail@xyz.de/Maildir/dovecot-acl-list

How is one supposed to determine which mails have to be selected for the recovery?
And this for a bigger number of mail accounts?

Such recovery situations are extremely time-critical and stressful. Under such circumstances one should still have to crawl around in the shallows of backups?

This backup module doesn’t fit to my needs.
Sincerely, Marko

Did you restore the most recent backup (maybe you need to do it from command line) to restore the local lists? Then the restore UI should work.

I have no idea how to do this and I can’t find a hint in the doc, but maybe I’m just blind.

With following command you can restore a backup via command line, here is the documentation.

restore-data -b <BACKUPNAME>

from a remote source? unknowingly through the server restored from a snapshot?
I have the feeling that I am spinning in circles.
Sincerely, Marko

When the backup is configured in the older snapshot, it should work because the backup method and location is known.

2 Likes