Koozali.org: home of the SME Server

backup to cd/dvd

Offline crazybob

  • *****
  • 894
  • +0/-0
    • Stalzer R&D
backup to cd/dvd
« on: December 12, 2006, 04:34:40 PM »
I have been looking for a program to backup data on a locally mounted cd-rw/dvd-rw. I have a customer that is used to changing a cd-rw disk once a day after their current server (just a win XP box) has completed a backup. I would like something that could be set up to auto mount and run during the night, then auto unmount. I thought I had found a solution with VCSBackup, that appeared to work on SME6 with cdrtools, but it doesn't seem to play well with SME7. It complains it cannot load the scsi driver.

All input greatly appreciated.

Thanks

Bob
If you think you know whats going on, you obviously have no idea whats going on!

Offline psoren

  • *
  • 371
  • +0/-0
Re: backup to cd/dvd
« Reply #1 on: December 12, 2006, 06:08:56 PM »
Quote from: "crazybob"


All input greatly appreciated.



I'm using CDrecord, CDutils and command line scripts on a CD-RW.
It burns one every month in cron.monthly and ejects it.
There is a server manager contrib but i think it didn't work in SME7, that's why i use the scripts.

You need:
cdrecord-2.01.1-5
cd-utils-0.3.2-1.noarch.rpm
mkisofs-1.10-11.i386.rpm

My script looks something like this:

#!/bin/sh

#Delete old ISO file. (From previous backup)
rm -f /tmp/somename.iso

#Burn the CD
cdrecord blank=fast dev=/dev/cdrom #Blanks the CD-RW
mkisofs -r -J -l -d -o /tmp/somename.iso /ibays/the_dir_you_want/ #Makes an ISO to burn
cdrecord -v -eject dev=ATAPI:0,1,0 fs=64M speed=10 driveropts=burnproof /tmp/somename.iso | mail me@myemail.adress


Maybe a bit simple but it has been working good for me.
I have never tried with a DVD drive, but can't be much different.

Per

Offline crazybob

  • *****
  • 894
  • +0/-0
    • Stalzer R&D
backup to cd/dvd
« Reply #2 on: December 12, 2006, 07:23:58 PM »
Thanks for the quick reply, Will give it a try.

Thanks again

Bob
If you think you know whats going on, you obviously have no idea whats going on!

Offline crazybob

  • *****
  • 894
  • +0/-0
    • Stalzer R&D
backup to cd/dvd
« Reply #3 on: December 13, 2006, 06:12:21 AM »
Per,  I have it working with a cd-rw. All I needed to add was cd-utils-0.3.2-1.noarch.rpm. SME 7.o has newer versions of the other 2 rpms.

Thanks

Bob
If you think you know whats going on, you obviously have no idea whats going on!

Offline psoren

  • *
  • 371
  • +0/-0
backup to cd/dvd
« Reply #4 on: December 13, 2006, 08:26:28 AM »
Quote from: "crazybob"
Per,  I have it working with a cd-rw. All I needed to add was cd-utils-0.3.2-1.noarch.rpm. SME 7.o has newer versions of the other 2 rpms.

Thanks

Bob


Nice! I just didn't remember which RPM's where there or not and so.... :oops:

Per

Offline del

  • *
  • 765
  • +0/-0
backup to cd/dvd
« Reply #5 on: December 15, 2006, 04:12:00 AM »
Hi Both,

Can you point me to where I can find out how to implement and run scripts like this. I have just about got the hang of the command line and would like to further my experience. :D

Regards,
Del
If at first you don't succeed, then sky-diving is not for you!
"Life is like a coin. You can spend it anyway you wish, but you can only spend it once." --Author Unknown

Offline psoren

  • *
  • 371
  • +0/-0
backup to cd/dvd
« Reply #6 on: December 15, 2006, 10:45:44 AM »
Quote from: "del"
Hi Both,

Can you point me to where I can find out how to implement and run scripts like this. I have just about got the hang of the command line and would like to further my experience. :D

Regards,
Del


If you type "man sh", you will get some info about it.

I usually open a new file with pico: pico -w /etc/cron.hourly/filename Type or cut and paste your script in there and use Ctrl+x to save and exit
That will create a file in cron.hourly, which will be executed every hour.
This will only happen if the file is executeable. To set it executeable type: chmod 700 /etc/cron.hourly/filename.

You can also run it manually by typing: sh /etc/cron.hourly/filename.

I have all my scripts in a folder under /root/scripts/ That way i get them all backed up. I then create symbolic links to the cron folders i want it to run in. I don't remember the command line for that but i just do it in Midnight Commander.

Have fun

Per

Offline del

  • *
  • 765
  • +0/-0
backup to cd/dvd
« Reply #7 on: December 15, 2006, 03:49:13 PM »
Hi Per,

Thanks for your input and info, I will give this a try on a test server this weekend :D

Regards,
Del
If at first you don't succeed, then sky-diving is not for you!
"Life is like a coin. You can spend it anyway you wish, but you can only spend it once." --Author Unknown