backup my website with PHP and GZIP

I have seen a couple of command lines that will let me backup a website to a gzip file.

What I am after is a php script that will do the same. My search fingers are failing me today, all I seem to be getting are ways of backing up my database which I don't need right now.

so any links or tips or code please :)

Who is Participating?

exec('tar -czf /path/to/backup.tar.gz /path/to/wwwdir/html');
Muhammad WasifCommented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.