Import project from Backup Problems

hello
after my crashed system i tried now import projects in my new installed platformio.
but i get a lot of errors

Server error: {“message”:"Invalid platformio.ini, project configuration file: ‘File contains no section headers.\nfile: E:\Backup-10-03-2019-C-und-D-Platte\C-Platte\users\achim\Documents\PlatformIO\Projects\Mega-Mother-box2\platformio.ini, line: 1\n’\x00\x00\xe3\x00AleE\\x00\\xb8\\x10\\x80\\xfa\\xff\\xff\\x10\\x10\\xe7\\x15\\x80\\xfa\\xff\\xff\\xe0a|\\x14\\x80\\xfa\\xff\\xff\\x11\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x01\\x12\\x00\\x00\\x00\\x00\\x00\\x00\\x17\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x10\\xc0\\x9d\\x14\\x80\\xfa\\xff\\xff\\xd0\\xbc\\xe6\\x01\\x80\\xf8\\xff\\xff\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00 \\r\\x00\\x10\\x80\\xfa\\xff\\xff\\x10\\xb0K\\x0f\\x80\\xfa\\xff\\xff\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00x\\xc1\\x9d\\x14\\x80\\xfa\\xff\\xffx\\xc1\\x9d\\x14\\x80\\xfa\\xff\\xff\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x98\\xc1\\x9d\\x14\\x80\\xfa\\xff\\xff\\x98\\xc1\\x9d\\x14\\x80\\xfa\\xff\\xff\\xf0\\x8bg\\x13\\x80\\xfa\\xff\\xff\\xa8\\x8cg\\x13\\x80\\xfa\\xff\\xff\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\xec\\t\\x00\\x00\\xec\\t\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x02\\x04\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00''","args":["File contains no section headers.\nfile: E:\\Backup-10-03-2019-C-und-D-Platte\\C-Platte\\users\\achim\\Documents\\PlatformIO\\Projects\\Mega-Mother-box2\\platformio.ini, line: 1\n'\\x00\\x00\\xe3\\x00AleE\x00\xb8\x10\x80\xfa\xff\xff\x10\x10\xe7\x15\x80\xfa\xff\xff\xe0a|\x14\x80\xfa\xff\xff\x11\x00\x00\x00\x00\x00\x00\x00\x01\x12\x00\x00\x00\x00\x00\x00\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\xc0\x9d\x14\x80\xfa\xff\xff\xd0\xbc\xe6\x01\x80\xf8\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \r\x00\x10\x80\xfa\xff\xff\x10\xb0K\x0f

my program-code looks also crazy

like a lot ???

what i make wrong?
kind regards
achim

If your platformio.ini and all your code was destroyed there’s nothing we can really do except recommend you a data recovery tool like Recuva.

Once you have the code you can just create a new platformIO project again.

1 Like

ok thanks i try it that tool

is there only 1 way to import my projects from my backup?
The “Import Arduino Project” ?

some lib’s i installed before in my old-platformio…
have i now install again this lib’s or can i copy the libs from any backup-folder ?

Have you tried actually opening the plaformio.ini and associated code files in a text editor to make sure they are actually valid files? As Max said, if they are corrupt, then you have a bigger problem to resolve.

No, that would be how you import arduino projects. If you have valid existing platformio projects that you want to add, you would click on ‘open project’. You could also use File -> Add Folder to Workspace. If you have to recreate the platformio.ini, doing an ‘import arduino project’ would probably be the easiest way to get started again, unless you want to use the command line.

Yes, in notepad++ looks like same same.

I think i take a misstake when i backup my system

If is possible i destroy some files when i take a backup and the files was not closed ?
because the files what i not used on this backup-time, this files all are ok…
My Backup was only a copy with the WIN7 explorer!!!

Yes, that is possible. Or perhaps your backup media has issues too! :open_mouth: :cry:

However, I would have expected a text file, such as your source code, if open, would either be empty (because you hadn’t saved it yet at the time of copying), old (because you had made changes but not yet saved) or complete (because it had been saved by the time you copied files).

For it to be corrupt, I think there are basically only three main possibilities:

  • either the damage had already been done and you were copying corrupted files,
  • the transfer was corrupted,
  • or the backup media is corrupted.

This is why it is good to use some sort of version control system, or a proper backup solution that at least verifies the backups are complete and readable.