I've created a PHP-based document management system and hosted it on my Raspberry Pi. I created a "backup" function that zips together all the documents, but it takes too long due to the hardware constraints of the Pi, as well as the fact that compression cannot be disabled when creating zip files in PHP.
This has led me to think that perhaps I should just devise some sort of binary file format that allows multiple files to be stored in it, and dump all my uncompressed documents into it when the user asks for backups. Oddly, I'm not necessarily concerned about the lack of possible "unarchivers".
Which file format is the easiest to implement, whether a standard format, or a proposed new format?
Is there any other alternative for solving my problem that does not require implementing a custom archiver?
Note that I wish to avoid the following:
- Shell commands (not portable).
- Installing third party dependencies (may not work on a third party hosted system).
- Rewriting my system in a different language.
tar
is implemented in PHP by the PharData class. It is worth noting that the Single Unix Specification recommendspax
as a replacement fortar
andcpio
.