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. Link to comment https://forums.phpfreaks.com/topic/90166-solved-how-to-situation-needing-compression-during-backup/ 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. Link to comment https://forums.phpfreaks.com/topic/90166-solved-how-to-situation-needing-compression-during-backup/#findComment-462459 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. Link to comment https://forums.phpfreaks.com/topic/90166-solved-how-to-situation-needing-compression-during-backup/#findComment-462550 Share on other sites More sharing options...
blackcell Posted February 9, 2008 Author Share Posted February 9, 2008 need solution for windows with compression Link to comment https://forums.phpfreaks.com/topic/90166-solved-how-to-situation-needing-compression-during-backup/#findComment-462641 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.