restore.pl - Attempt to call undefined import method with arguments

Moderator: crythias

Post Reply
Manfred89
Znuny newbie
Posts: 73
Joined: 14 Jun 2023, 21:44
Znuny Version: 6.5.18
Real Name: Manfred

restore.pl - Attempt to call undefined import method with arguments

Post by Manfred89 »

Hey Guys,

I wanted to perform a database backup on my test systems for testing purposes. While doing so, I received the following message from restore.pl:

Code: Select all

/opt/otrs/scripts/restore.pl -b /opt/backup/ -d /opt/znuny/
Attempt to call undefined import method with arguments (“catfile”) via package “File::Spec” 
(Perhaps you forgot to load the package?) at /opt/otrs/scripts/restore.pl line 26.
Restore /opt/backup/Config.tar.gz ...
Restore /opt/backup/Application.tar.gz ...
create MySQL
Restore database into MySQL ...
The backup was successful and looks fine at first glance, but I don't know if there could be problems in the background.
I suspect that it is due to Debian 13, or rather the Perl version.
Perl-Version 5.40.1

Greetings
root
Administrator
Posts: 4283
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: restore.pl - Attempt to call undefined import method with arguments

Post by root »

Hi,

Have you checked with /opt/znuny/bin/znuny.CheckModules.pl --all that all required modules are installed?

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
Manfred89
Znuny newbie
Posts: 73
Joined: 14 Jun 2023, 21:44
Znuny Version: 6.5.18
Real Name: Manfred

Re: restore.pl - Attempt to call undefined import method with arguments

Post by Manfred89 »

Thanks for your quick reply, Roy.
I checked the modules beforehand and all the necessary modules are installed.

Code: Select all

/opt/znuny/bin/znuny.CheckModules.pl --all
 o DBD::ODBC........................Not installed! To install, you can use: 'apt-get install -y libdbd-odbc-perl'. (optional - Required to connect to a MS-SQL database.)
  o DBD::Oracle......................Not installed! (optional - Required to connect to a Oracle database.)
  o DBD::Pg..........................Not installed! To install, you can use: 'apt-get install -y libdbd-pg-perl'. (optional - Required to connect to a PostgreSQL database.)
  o Jq...............................Not installed! (optional - Support for extended condition checking via Jq for the generic interface.)


/opt/znuny/scripts/restore.pl -h
Attempt to call undefined import method with arguments ("catfile") via package "File::Spec" 
(Perhaps you forgot to load the package?) at /opt/otrs/scripts/restore.pl line 26.

Restore an OTRS system from backup.

Usage:
 restore.pl -b /data_backup/<TIME>/ -d /opt/otrs/

Options:
 -b                     - Directory of the backup files.
 -d                     - Target OTRS home directory.
 [-h]                   - Display help for this command.
The message also appears in the old system. My guess is that the new Perl version checks some things more strictly and is more likely to generate an (error) message.
root
Administrator
Posts: 4283
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: restore.pl - Attempt to call undefined import method with arguments

Post by root »

Hi,

Does the restore work anyway?

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
Post Reply