Pulling One File From a Plesk Backup

I won’t repeat my frequent anti-Plesk rant, but suffice to say: it’s a pain.

For some reason, we wanted one file back out of a backup. It took me a few minutes to realise it, but Plesk’s backups are essentially MIMEd and gzipped. So, rather than fighting with their mysterious semi-documented backup-unpack tool, just say:-

zcat backupfile | sed -n -e '/name="filename.whatever/,/^--_--/p' >filename.whatever

If you don’t know the filename, zless’ing the head of the file should find it from the XML description blocks pretty quickly. Slight editing of the output file will be necessary, to strip MIME and so on, but it’s easier than installing too much else on a webserver.

Does anyone know why this gzipped-MIME is better than tar.gz or something else common and easy-to-use?

This entry was posted in GNU/Linux and tagged , , , , , , , , . Bookmark the permalink.