Slion.net>Issues>IssueReport5

Issue %TOPICID{topic="IssueReport5"}%

Automatic Backup

Project: Linux Server
Type: Task
Priority: 2:Needed
State: Implemented
Reported by: StephaneLenclud
Assigned to: StephaneLenclud
Created by: StephaneLenclud
Created on: 16 Mar 2006

Details

I need to setup an automatic backup process. I don't want to backup my entire system but just some directories. I had a look at the Yast system backup and I think it's a bit overkill for me. Then I had a look at dar and KDar and seems a more appropriate solution. I'll probably use it along with cdrecord and cron eventually. cron is a daemon to execute scheduled commands. More info about cdrecord here.

Discussion

Looks like dar was just what I needed. See the following attached perl script dobackup.pl.txt to perform back up and burn CD/DVD. A similar script should be used with cron to perform scheduled backup.

More info about cron here and there or even on http://www.crontabrocks.org/.

Solution

We now have 3 scripts:

To setup the scheduled task just do: crontab -e to open your crontab in VI. Then add the following line: 00 3 * * * /backup/bin/doautobackup.script to execute backup every day at 3:00 in the morning.

Those should be added to source control.

Related Topics

OpenIssueList, ClosedIssueList, IssueList, ProjectList, WebHome, IssueTemplate, IssueInclude



Edit Form

Type
Task
State
Implemented
Priority
2:Needed
Summary
Automatic Backup
Details
I need to setup an automatic backup process. I don't want to backup my entire system but just some directories. I had a look at the Yast system backup and I think it's a bit overkill for me. Then I had a look at dar and KDar and seems a more appropriate solution. I'll probably use it along with cdrecord and cron eventually. cron is a daemon to execute scheduled commands. More info about cdrecord here.
Discussion
Looks like dar was just what I needed. See the following attached perl script dobackup.pl.txt to perform back up and burn CD/DVD. A similar script should be used with cron to perform scheduled backup.

More info about cron here and there or even on http://www.crontabrocks.org/.



Solution
We now have 3 scripts:
* /backup/bin/doautobackup.script : called by cron. Just calls the following Perl script.
* /backup/bin/doautobackup.pl : call the following Perl script and send an e-mail containing its output.
* /backup/bin/dobackup.pl : perform the actual backup and burn a CD

To setup the scheduled task just do:
=crontab -e= to open your crontab in VI. Then add the following line:
=00 3 * * * /backup/bin/doautobackup.script= to execute backup every day at 3:00 in the morning.

Those should be added to source control.
Version
Reported by
Main.StephaneLenclud
Assigned to
Main.StephaneLenclud

I Attachment Action Size Date Who Comment
txttxt dobackup.pl.txt manage 1.1 K 20 Mar 2006 - 23:21 StephaneLenclud Perform back up and burn CD/DVD