1752717 Members
5637 Online
108789 Solutions
New Discussion юеВ

Re: backup data

 
SOLVED
Go to solution
'chris'
Super Advisor

backup data

hi

is it correct to backup data with:

tar cjpf /opt/save/backup-www-` date +%Y-%m-%d `.tbz /srv/www

regards
chris
3 REPLIES 3
'chris'
Super Advisor

Re: backup data

sorry, I mean

tar cjpf /opt/save/backup-www-` date +%Y-%m-%d `.tbz /srv/www

to get more compressed.
Michael Williams_6
Trusted Contributor

Re: backup data

Hi Chris, call me lazy, but why to a process to do this when there's a tool that can do it for you!!

Read up on the manpage for logrotate which:
"is designed to ease administration of systems that generate large numbers of log files. It allows auto├В┬нmatic rotation, compression, removal, and mailing of log files. Each log file may be handled daily, weekly, monthly, or when it grows too large."

We actually use it to clean out the /tmp directory and other minor maintenance things, we are thinking of using it to generate on-line backups of our web servers too...

However, you might well be able to tinker with it to do the same with your web-sites to ensure you have easy access to backups.

If this is only an ad-hoc thing, then I don't see any problems with it, although I'd use tar -zcvf to do a compressed .tar.gz file myself, but that's a personal preference thing
Claudio Cilloni
Honored Contributor
Solution

Re: backup data

It seems to me an easy way to have a daily copy of your /srv/www directory. The command should work fine.

Ciao
Claudio