Rebuild APFS Container Scheme using Terminal I am having an issue with an internal HDD from my MacBook Pro Mid-2012 by some reason not sure why it change the file system from GUID to APFS. Right now I been trying to recover my data but there are several files that are shown as "corrupted", so I been researching that the is a way I could fix or rebuild the partition table but I am not sure which one I am currently have the GUID or the APFS but I am sure there is one that is corrupted. Actually I have tried with DiskWarrior but it tells me that "APFS is not supported" so I want to try if there is a way by using Terminal.



Any help will be much appreciated.

Thanks
Alberto
Too much for a comment, so I'm dropping this in the answer space - be kind ;)

GUID isn't the partition format, it's the underlying 'low level' format, as opposed to MBR. Previously, Macs used HFS+ for the file system, but that will have been automatically updated to APFS perhaps when you upgraded to Mojave [ iirc.. SSDs would have changed at High Sierra, HDs at Mojave]. As you rightly say, DiskWarrior cannot yet handle APFS, only HFS+. 

I'm not sure you should be thinking about rebuilding the partition table, or writing anything at all to a disk with signs of corruption until you can safely rescue the data you have on there.

If you have a solid backup then you could always just reformat, which would take any bad blocks out of service.

Without a backup, then you ought to be using another Mac to download &amp; create a rescue boot drive; avoiding writes to the suspect drive.
There are several apps which may be able to recover your data, Recovering an accidentally deleted  folder in OSX - no Time Machine or backup available  has some options.