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

The restore function with pi-manage is broken on privacyidea 3.9.2 #3841

Open
sepp67 opened this issue Jan 2, 2024 · 3 comments
Open

The restore function with pi-manage is broken on privacyidea 3.9.2 #3841

sepp67 opened this issue Jan 2, 2024 · 3 comments
Labels
Type: Enhancement Not a complete new functional component/feature but an enhancement of an already existing feature.

Comments

@sepp67
Copy link
Contributor

sepp67 commented Jan 2, 2024

The restore function with pi-manage is broken on privacyidea 3.9.2

The issue was reproduces on a fresh installation.
ubuntu 22
privacyidea 3.92

The issue happens only when the radius config is integrated in the backup

pi-manage backup create radius_directory /etc/freeradius/3.0/

Then the following error message follows:

Also restoring encryption key 'enckey'
Restoring to /etc/privacyidea/pi.cfg with data from /etc/freeradius/3.0/mods-config/sql/ippool/postgresql/procedure.sql
Restoring database.
ERROR 1146 (42S02) at line 32: Table 'pi.radippool' doesn't exist

@sepp67 sepp67 added the Type: Possible bug Suspected bug by user label Jan 2, 2024
@cornelinux cornelinux added Type: Feature request A change requested or proposed by a user which is not on the default roadmap and removed Type: Possible bug Suspected bug by user labels Jan 3, 2024
@cornelinux
Copy link
Member

A table pi.radipool is not default to privacyIDEA.
This is the old problem, that default tools can not solve none-default tasks.
@sepp67 Please consider closing this request.

@sepp67 sepp67 closed this as completed Jan 3, 2024
@plettich
Copy link
Member

plettich commented Jan 8, 2024

The problem here is that we use the first *.sql file as the privacyIDEA database dump:

elif re.search(r"\.sql", line):

We know that the database dump from the backup -> create is called dbdump-<DATE>.sql so we can search for this pattern instead of just using the first *.sql in the backup.

Could probably be combined with #3815

@plettich plettich reopened this Jan 8, 2024
@cornelinux
Copy link
Member

Simple solution would be to omit the backup of the non-default FreeRADIUS configuration.
Then everything would work out fine.

@cornelinux cornelinux added Type: Enhancement Not a complete new functional component/feature but an enhancement of an already existing feature. and removed Type: Feature request A change requested or proposed by a user which is not on the default roadmap labels Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Not a complete new functional component/feature but an enhancement of an already existing feature.
Projects
None yet
Development

No branches or pull requests

3 participants