blackcell Posted February 9, 2008 Share Posted February 9, 2008 I want to backup directories but I want to compress the copy instead of using copy(); Ive been trying a few things and they don't seem to be working. I am positive I have my source and destination correct but it keeps bugging out. Quote Link to comment Share on other sites More sharing options...
ratcateme Posted February 9, 2008 Share Posted February 9, 2008 i back up my web dir using this code (Linux) <?php $backup_file='/backup/www/backup_www.tgz'; $dir_to_backup='/var/www/'; $command="tar -cvf $backup_file $dir_to_backup"; echo system($command); ?> Scott. Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted February 9, 2008 Share Posted February 9, 2008 assuming you're on a linux/unix/os x, you may want to look into the rsync command, which provides incremental (or full) back-ups with or without compression. i use it to back up my files every night, running in a sh script. Quote Link to comment Share on other sites More sharing options...
blackcell Posted February 9, 2008 Author Share Posted February 9, 2008 need solution for windows with compression Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.