The web server is old and slow. It performs wonderfully on a day-to-day basis. But sometimes it chokes and times out during a large backup.
The server operates several virtual web sites. Each has several sub-directories, some of which need to be backed up nightly. Other subdirectories are large and cumbersome - and they do not require backups. Each site has
/web -- must be backed up
/users -- must be backed up
/logs -- large, no backup needed.
plus some other subdirectories that don't need to be backed up.
To make backups work more smoothly, I separated the old
one process - one tar nightly backup into separate backups for each virtual site. Now I backup to create
site1.tar
site2.tar
site3.tar
and so on....
That worked for a while. But as the sites grow, the files are bigger and the tars are more likely to fail. The log files are a large part of the growth problem.
I'm going to change the backup procedure (again) to eliminate the backup of the "logs" directories.
Is there a way to express the tar command so that I can create one backup for each site, but include only 2 of the subdirectories (or exclude 1 of the subdirectories) for each site?
The current command for each site's backup is
tar -xvf site1.tar /home/site1
I'm thinking of something like tar -xvf site1.tar /home/site1/web
,/home/site1/users.
I could do two backups for each site:
tar -xvf site1.tar /home/site1/web
tar -xvf site1.tar /home/site1/users
That would just double the fun.
There is no money for a new webserver. The frequency of backups and the retention policies are not negotiable.
Like the people working in public schools, this public school system's web server is overworked and underfunded. I use scripts and multiple archive directories to help manage this load, but I still have to inspect the newest TARs every day to reduce the chances of a foul-up.
15 backups (15 sites) nightly is complicated enough; 30 backups every night might push me over the edge.
I'm open to suggestions. Thanks in advance.