PHP backup script/library
Files in data/ folder with extension .z are compressed with gzip.
Files without extensions are regular CSV files with columns in same order as defined in /table folder.
# uncompress and keep original *.z file
gunzip -c table.z > table
# uncompress and remove original *.z file
gunzip cms_page.z
The resulting file is CSV file loadable with MySQL LOAD DATA method.
# dry run to see what will be done
php -f restore.php -- --remove-files csv /xtdbbackup/path
# remove physicaly the files
php -f restore.php -- --remove-files ^csv /xtdbbackup/path