Hello Bob,
I tried it also with AIX 7.2 TL05 and AIX 7.3 TL 02 the only thing is you have to use single ' in the selection as Alexandre also mentioned.
restore -Xqvf ' ./.profile'
And I think i used the X instead of x, but not sure here.
see man page:
To restore files beginning at a specified volume number
restore -X
Number [-
M
d
n
q
v
e
O
Q
] [ -b
Number] [ -f
Device] [ -s
Number] [ -E
{ force
| ignore
| warn
}] [File ... ]
Did you tried that?
------------------------------
Christian Sonnemans
Tactical Unix system engineer
De Volksbank
Den Bosch
------------------------------
Original Message:
Sent: Tue March 11, 2025 03:49 PM
From: Bob Wyatt
Subject: How to restore ".filename" in the root folder from a back-by-name mksysb
Andrey,
The total size of the 9 hidden files is less than 10 MB.
The root file system has more than 1 GB of free space.
As others report success on different AIX levels and the command used as being correct, I can only presume that there is something about this system contributing to the difficulty as was suggested.
It would not appear to be insufficient disk space, however.
Regards,
Bob Wyatt
Original Message:
Sent: 3/11/2025 11:27:00 AM
From: Andrey Klyachkin
Subject: RE: How to restore ".filename" in the root folder from a back-by-name mksysb
Bob,
I think the reason why you can't restore the files is not the restore command, but as you write - you have not enough space in your filesystem. That's why it is easier to copy the mksysb file to another system, unpack the files you need there, and copy the files back.
The command you use is correct and works on AIX 7.1 without any problems. I can't see the file list of your mksysb, but I trust you that the files are there. It means the problem is on your system. That's why to make it easier for you, unpack the files on another system.
------------------------------
Andrey Klyachkin
https://www.power-devops.com
Original Message:
Sent: Tue March 11, 2025 10:16 AM
From: Bob Wyatt
Subject: How to restore ".filename" in the root folder from a back-by-name mksysb
Andrey,
It is AIX 7100-05-06.
Unfortunately, insufficient disk space to set up an LPAR or alternate disk restore.
Some of the .files "missing" are from AIX 5.1 – not too concerned.
Others were manually rebuilt, including the .profile; the accuracy or these are still being vetted, day by day...
It seems odd that .files can't be selectively restored by name from a mksysb image without various work-arounds.
Regards,
Bob Wyatt
Original Message:
Sent: 3/11/2025 9:40:00 AM
From: Andrey Klyachkin
Subject: RE: How to restore ".filename" in the root folder from a back-by-name mksysb
Bob,
if it shows that the file exists:
- which AIX version do you have?
- can you try to restore on another machine? The restore command restores files in the current directory, so simply create a temporary directory, cd into it, and restore the files from the mksysb image
------------------------------
Andrey Klyachkin
https://www.power-devops.com
Original Message:
Sent: Tue March 11, 2025 09:13 AM
From: Bob Wyatt
Subject: How to restore ".filename" in the root folder from a back-by-name mksysb
Andrey,
The restore -Tvf shows the .profile path desired exists and is in the specified path.
There was a total of 9 hidden (.filename) files that, although they exist, they are 0 bytes.
None of the 9 files could be recovered from the mksysb with the described restore command in the original post.
Regards,
Bob Wyatt
Integration/Support Specialist
Ashwood Computer, Inc.
bobw@ashwoodcomputer.com
(609) 405-1151
Original Message:
Sent: 3/11/2025 3:33:00 AM
From: Andrey Klyachkin
Subject: RE: How to restore ".filename" in the root folder from a back-by-name mksysb
Are you sure that the file is in the mksysb?
The command you wrote is correct and works if the file is in mksysb.
------------------------------
Andrey Klyachkin
https://www.power-devops.com
Original Message:
Sent: Mon March 10, 2025 04:40 PM
From: Bob Wyatt
Subject: How to restore ".filename" in the root folder from a back-by-name mksysb
A client on AIX 7.1 managed to clear all of the ".filename" files in the root folder.
In reviewing the list, there's only a few needed or desired to be restored.
restore -xqvf /usbmnt/usr/sys/inst.images/mksysb.img ./.profile (for example) does not work.
All of the examples in documents show the restore of a "normally-named" (not hidden or dotted/hidden) file.
Would someone know the "trick" to getting it restored?
Thank you in advance!
------------------------------
Bob Wyatt
------------------------------