Problems in restoring from duplicity backup NS7.5 to NS7.9

NethServer Version: 7.9
Module: Backup

I need to restore a specific folder from a backup made in a 7.5 machine in some moments in time, to find the latest version of certain files before the got corrupted.
I originally thought to install a 7.5 machine to do the thing, but I discovered that CentOS repos for 7.5 are no loger available, so I could install the machine, but not the backup-data module.
So I started over again with a 7.9 installation, but when I get to the restore I cannot select my set (an USB disk formatted EXT4). I tried to schedule a backup with the same name like I did before Cockpit, but no luck.
Is there a way to do what I need from cockpit interface or I must study duplicity from command line? :sob:

Hello @UncleDan,

Did you install the Backup restore module in the software-center?

https://docs.nethserver.org/en/v7/backup.html#selective-restore-of-files

It may be needed to manual mount the usb-drive if it not recognized as backup media.

(If it really does not work with 7.9.2009 it is still possible to work with 7.5.1804,
all CentOS packages move to https://vault.centos.org/centos)

You could untar the duplicity file and copy it back manually.
I tried this with winrar at a windows client, but I think you have to do it at a linux system or you need a thirdparty app, because you have an ext4 stick. If you do it at a client you can copy the folder via ssh.

Hoping that the dev team could produce some kind of wiki for this “hack” restores…

Yes, I did install the module: I can setup a backup on the disk:


And (it seems, I did not try) that I can restore directly from the backup (but I cannot select the folder AND THE DATE from there:
image
But in the restore app it is all gray:

Where am I supposed to mount the disk to be seen there?

For the other option: it was my favourite one because I love the old interface over cockpit (don’t blame me for that!) but I had errors while using yum and I coud not figure out how to modify the repo file to point to vault. If you can point me in the right direction on that I will be super-happy!

You can still install the old server-manager in 7.9.2009 :grinning:
Look for it in the software-center install it and login in on port 980, (https://FQDN:980 )
(ping me if you still want the older version, but i do not think this helps with your issue)

One line in the documentation is a bit disturbing:

Please note that selective restore will be available only for backups executed after the application installation.

This raises two questions:
(one for you) Can you remember if the restore-module was installed on the 7.5.1804 machine ?
(one I do not know the answer to) the above is yes, are the indexes needed stored on the backup?

Hope someone else can answer this too. :astonished:

Is this server you production machine or just a temporary installation to access the backup?
Asking because if it is a temporary install you can try to restore and overwrite all data.
To be clear DO NOT DO THIS on your production server.

I did install the old interface but in 7.9 the restore app points to the cockpit version… :interrobang:
It is a temporary install but with the “global” restore I cannot choose the point in time to restore from and I absolutely need to do some try to find the correct one.

Can I dare to ask… Could you help me in modding the 7.5 version repo file to point to the vault?

Well have to try this out my self :grinning: If it is necessary we get there…

just started a VM to reproduce your issue somewhat…
Give me a little bit of time to figure out how it works…

Can not find them util now

Never used duplicity before so let find out together,
Going to try to restore test.odt

my backup disk(participation) is /dev/sdb1

mount /dev/sdb1 /mnt

ls /mnt

output here:

total 20
drwxr-xr-x 2 root root  4096 Feb 24 18:07 labns01
drwx------ 2 root root 16384 Feb 24 18:01 lost+found

show status with backup dates:

duplicity collection-status file:///mnt/labns01/

lets look for my test file test.odt

duplicity list-current-files file:///mnt/labns01/ | grep test.odt

output here:

Tue Feb 23 11:36:27 2021 var/lib/nethserver/nextcloud/admin/files/test.odt

duplicity --file-to-restore var/lib/nethserver/nextcloud/admin/files/test.odt file:///mnt/labns01/ ./test20210324.odt

with -t 1M option you go back one month : (do not have an ald backup so can not test)

duplicity -t 1M list-current-files file:///mnt/labns01/ | grep test.odt

duplicity  -t 1M --file-to-restore var/lib/nethserver/nextcloud/admin/files/test.odt file:///mnt/labns01/ ./test20210324.odt

If this does not work we could try to go back to 7.5 (still doubt this would help :thinking:)

EDIT: exact date

duplicity  --time 2021-02-24  --file-to-restore var/lib/nethserver/nextcloud/admin/files/test.odt file:///mnt/labns01/ ./test20210324.odt
1 Like

@UncleDan,

Do you have a linux desktop computer?

deja-dup is a graphical client/browser for duplicity

EDIT:

Again do not think it is a path to the solution :grinning:

download the nethserver-7.5.1804 iso
https://sourceforge.net/projects/nethserver/files/nethserver-7.5.1804-x86_64.iso/download

install it DO NOT UPDATE

cat >  /etc/yum.repos.d/CentOS-Base.repo << EOF
[base]
name=CentOS-$releasever - Base
baseurl=https://vault.centos.org/centos/7.5.1804/os/\$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

[updates]
name=CentOS-$releasever - Updates
baseurl=https://vault.centos.org/centos/7.5.1804/updates/\$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

[extras]
name=CentOS-$releasever - Extras
baseurl=https://vault.centos.org/centos/7.5.1804/extras/\$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

[centosplus]
name=CentOS-$releasever - Plus
baseurl=https://vault.centos.org/centos/7.5.1804/centosplus/\$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
EOF

and

cat > /etc/yum.repos.d/NethServer.repo << EOF

[nethserver-base]
name=NethServer-$releasever - Base
baseurl=http://mirror.nethserver.org/nethserver/7.5.1804/base/\$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-NethServer-$releasever
enabled=1
enablegroups=0

[nethserver-updates]
name=NethServer-$releasever - Updates
baseurl=http://mirror.nethserver.org/nethserver/7.5.1804/updates/\$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-NethServer-$releasever
enabled=1
enablegroups=1

[nethserver-testing]
name=NethServer-$releasever - Testing
baseurl=http://mirror.nethserver.org/nethserver/7.5.1804/testing/\$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-NethServer-$releasever
enabled=0
enablegroups=0
EOF

Now you are pretty much locked on 7.5.1804

yum --enablerepo=* clean all
yum makecache

!!NOTE FOR ALL READERS!!
Do Not use this setup in production, it is unsecured and unstable!!!

1 Like

Haven’t checked them but had some bookmarked hints:





1 Like

I think I will go with duplicity from command line (I did the first try and it seems to work) or if it fails plug the disk in an Ubuntu Dekstop and try deja-dup.

Thanks all for all precious hints.

@dnutan at first try I did not set the same hostname, then I did but I would not have a clue on how configuring the same db

2 Likes