Making a Crontab to backup my webroot

Status
Not open for further replies.

tnl2k7

Banned
Messages
3,131
Reaction score
0
Points
0
Hello,

Nothing like this seems to have been asked on the forums and I don't really know how to do it, so I thought I'd ask.

Is there any way I could make a Crontab to backup a folder to a zip file once a day? I've looked at Cronjobs but I don't know what commands to use. I use Linux as my OS at home, but I'm very new and I'm not familiar with Cronjobs.

Thanks in advance!
Luke.

EDIT:
right, I've come up with a command that I've tested, I've configured it as a Crontab to see whether it works and it makes a file called backup.zip, could an admin or someone tell me whether it's OK? The settings are listed below.

Command:
zip -9 -r /home/tnl/backups/backup.zip /home/tnl/public_html

Minutes:
0

Hours:
11 = 11 AM

Days:
Every Day

Months:
Every Month

Week Days:
Every Week Day

If it's not OK I'd gladly replace it with another one.
Thanks,
Luke.
Edit:
I'm gonna close the thread, been as the script is running OK and hasn't caused any problems, I've recieved two emails from the Cron Daemon (root [at] absolut [dot] x10hosting [dot] com) and there's been no problems.
 
Last edited:
Status
Not open for further replies.
Top