I'd like to backup the files - off the server. Moving them doesn't really help with the backup. I've hit the 4GB filesize limit on the server when trying to backup the files into a tar file. I've come up with a pretty good backup method, but the cache is just too big now. I've even excluded the upload directory.
Code:
[root@crm bin]# cat laserphotonicsfbweekly
#!/bin/bash
# laserphotonicsfbweekly:
# consists of three lines: one to find the modified files, and then two to tar and gzip them
find /usr/share/sugarcrm/ ! \( -name upload -prune -a -type d -prune \) ! -type d > /usr/share/sugarcrm_backups/laserphotonics_full_files.txt
tar cT /usr/share/sugarcrm_backups/laserphotonics_full_files.txt > /usr/share/sugarcrm_backups/laserphotonics_fbweekly.`date '+%F'`.tar
gzip -9 /usr/share/sugarcrm_backups/laserphotonics_fbweekly.`date '+%F'`.tar
[root@crm bin]# cat laserphotonicsfbdaily
#!/bin/bash
# laserphotonicsfbdaily:
# consists of three lines: one to find the modified files, and then two to tar and gzip them
find /usr/share/sugarcrm/ -mtime -1 \! -type d > /usr/share/sugarcrm_backups/laserphotonics_modified_files.txt
tar cT /usr/share/sugarcrm_backups/laserphotonics_modified_files.txt > /usr/share/sugarcrm_backups/laserphotonics_fbdaily.`date '+%F'`.tar
gzip -9 /usr/share/sugarcrm_backups/laserphotonics_fbdaily.`date '+%F'`.tar
The weekly backup process is the full backup. The daily backup process is just for daily changes.
Bookmarks