duckboy81
duckboy81

Reputation: 307

Cannot zip more than 4GB, cannot tar with filenames > 100 characters, what's next?

I am trying to rebuild a backup system that currently zips boatloads of files for easy archiving (using PHP's ZipArchive class). The problem I'm having is that ZipArchive only supports files up to 4GB.

I thought I found a solution: PharData

But the PharData class comes with its own problems, namely, filenames cannot be greater than 100 characters for tar archives.

I've read about solutions for command line users (Zip64 and extended headers for tar files), but I don't see solutions built-in or that are native to PHP.

Am I missing the right tool for the job? Or is this a common roadblock?

Thank you! (I'm horrible at making question titles, sorry!)

Edit: The files I am backing up are stored on the server with a random string of text and the real filename is repopulate when the files are zipped. I'm concerned about passing user submitted filenames to my Linux command line.

Upvotes: 0

Views: 359

Answers (2)

user149341
user149341

Reputation:

PharData is meant to be used as part of the Phar PHP application archiving format. It's not intended for general use.

Use the Archive_Tar PEAR class to create tar archives.

Upvotes: 1

Atul Jindal
Atul Jindal

Reputation: 976

You can use shell scripting, create bash script with couple of shell commands to make .tar of all the files using Linux built in command.

This link might be useful to read further

http://broexperts.com/2012/06/how-to-backup-files-and-directories-in-linux-using-tar-cron-jobs/

Upvotes: 0

Related Questions