Find the answer to your Linux question:
Results 1 to 8 of 8
I need a command line program to burn a directory to a cd-R. ie so I can use a script and set up a cron job. I need to back ...
  1. #1
    Linux Guru gogalthorp's Avatar
    Join Date
    Oct 2006
    Location
    West (by God) Virginia
    Posts
    3,105

    Command line file copy to CD

    I need a command line program to burn a directory to a cd-R. ie so I can use a script and set up a cron job. I need to back a directory periodicly and automaticly.

    Can anyone give me some direction here?

  2. #2
    jwf
    jwf is offline
    Linux Newbie jwf's Avatar
    Join Date
    Mar 2005
    Location
    Ontario, Canada
    Posts
    187
    I have a SUSE book here that suggests to use a program called "Konserve". You may already have it on your system. check K menu > System > Desktop Applet > Konserve Apparently it allows for scheduled backups and I wouldn't be surprised if you could kick it off with a cron entry.
    Other than that, the command line cdrecord will send files to CD-R and CD R/W.
    Ubuntu 11.04 on IBM ThinkCentre
    Fedora, VMware Player (windows xp,Knoppix 6.5) on Lenovo Laptop
    GRUB Fedora / Windows 7, VMware Player (Windows 2008 server) on NCIX quad core PC.

  3. #3
    Linux Guru gogalthorp's Avatar
    Join Date
    Oct 2006
    Location
    West (by God) Virginia
    Posts
    3,105
    Thanks

    cdrecord seems to only support SCSI devices???

    I'll look for Konserve it does not appear on my menu.

  4. #4
    Linux Guru gogalthorp's Avatar
    Join Date
    Oct 2006
    Location
    West (by God) Virginia
    Posts
    3,105
    Ok found konserv

    looks like it only backups to directories.

    cdrecord seems to be SCSI only. It did not recognize my CD/DVD burner on my current machine.

    In this case this is a stand alone machine no network no internet.

    I need to backup to cds automaticly. I can't believe no one is doing this. All the backup programs I've found so far simply make a compressed image of some sort to a folder on the machine or network. You then need to manualy transfere this to a cd. But I have really dumb users in this case and can't trust them to do it correctly. I'm running a POS and we are talking video store clerks here.

    does not have to be open source!!! but would prefer it

  5. #5
    Linux Guru gogalthorp's Avatar
    Join Date
    Oct 2006
    Location
    West (by God) Virginia
    Posts
    3,105
    OOps I guess it cdrecord might work. I must have typed something wrong the last I check but it is now showing my cd writer as a device. cool

    But you still must build an iso image before the burn.

  6. #6
    Linux Guru Juan Pablo's Avatar
    Join Date
    Mar 2006
    Location
    /home/south_america/ecuador/quito
    Posts
    2,064
    A script can help

    Use mkisofs and cdrecord
    Put your hand in an oven for a minute and it will be like an hour, sit beside a beautiful woman for an hour and it will be like a minute, that is relativity. --Albert Einstein
    Linux User #425940

    Don't PM me with questions, instead post in the forums

  7. #7
    Just Joined! siliconheart's Avatar
    Join Date
    May 2006
    Posts
    14
    I am doing exactly the same thing without a glitch using
    tar -cvzf file.tar.gz {folders}
    mkisofs file.tar.gz /tmp/file.iso # intermediary step
    cdrecord -v -dao dev=x,0,0 file.iso
    rm -rf /tmp/file.iso # intermediary disc cleanup


    Is there any way to write directly to cd-r ? I wrote to the cd-r using tar -cvzf /dev/cdwriter folder, but the cd was trash dump for obvious reasons.

    Is there any other work around?

  8. #8
    Just Joined! siliconheart's Avatar
    Join Date
    May 2006
    Posts
    14

    Lightbulb

    Walla!!!
    I got the answer:

    mkisofs -R {source_file} | cdrecord -v fs=6m speed=2 dev=x,x,x

    where

    -R enables Rock Ridge protocol in order to describe iso 9660 format for the cd media
    x,x,x can be get cdrecord -scanbus
    fs describes the non-default buffer size (default 4MB)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...