System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

could not restore file from backup

could not restore file from backup

hello,

we are performing a daily backup of our rp5440 server using SAM.
Today I tried to restore a single file, but it was interrupted with the following message.

“The restore of the file was not possible because when making the backup the variable LANG and LC_COLLATE was not set. Please reset the variable and try it again.”

The command printenv doesn´t show the variables.

What can I do to get the file restored.

Thank you and best regards

Ruediger
8 REPLIES
Jupinder Bedi
Respected Contributor

Re: could not restore file from backup

you can set it by using #setlocale command and if you want to see the information use #getlocale
All things excellent are as difficult as they are rare
Dennis Handly
Acclaimed Contributor

Re: could not restore file from backup

I'm not sure why SAM cares if the variable was set or not, you just want the file restored.

You could "export LANG=C" and retry running SAM?
Jupinder Bedi
Respected Contributor

Re: could not restore file from backup

I think so that there is no chance recover your file.
All things excellent are as difficult as they are rare
Nafez ALNajjar
Frequent Advisor

Re: could not restore file from backup

Hi,

1. Issue the following command to obtain information on all the public locales that are accessible to your System:

# locale -a

2. Choose a value for your system from the output that is displayed and export the:
[LANG ,LC_ALL ,LC_COLLATE ,LC_CTYPE, LC_MESSAGES ,LC_MONETARY ,LC_NUMERIC ,LC_TIME ]environment variables to this value. Here is an example command that sets the values to en_US.iso88591:


LANG=en_US.iso88591
LC_ALL=en_US.iso88591
LC_COLLATE=en_US.iso88591
LC_CTYPE=en_US.iso88591
LC_MESSAGES=en_US.iso88591
LC_MONETARY=en_US.iso88591
LC_NUMERIC=en_US.iso88591
LC_TIME=en_US.iso88591

if it works ;put the above lines in /etc/profile

Good Luck,
Nafez ALNajjar

Re: could not restore file from backup

We are running only a small UNIX installation for our CAD system, so I´m not very familiar with UNIX, knowing only basics.

@Dennis Handly
what does "export LANG=C" mean, I couldn´t find the command export

@ Nafez ALNajjar
do I export the variable using â setenv LANG= en_US.iso88591â

Sorry for these questions

Best regards

Ruediger
Jupinder Bedi
Respected Contributor

Re: could not restore file from backup

dont get confuse , simply run this command as it is

# setlocale(LC_COLLATE, "C");


Good Luck
All things excellent are as difficult as they are rare
Nafez ALNajjar
Frequent Advisor

Re: could not restore file from backup

Hi,

to export the variable run the command:

#export LANG=en_US.iso88591

Regards,
Nafez ALNajjar
Dennis Handly
Acclaimed Contributor

Re: could not restore file from backup

>what does "export LANG=C" mean, I couldn't find the command export

This is a shell command that exports the variable LANG with the value "C", the default locale.

>do I export the variable using "setenv LANG= en_US.iso88591"?

Only if you are using the scummy C shell and then you leave out the "=".

>Jupinder: setlocale(LC_COLLATE, "C");

This is a function call that you would use for C, not a shell command.