Author Topic: [SOLVED] MyLiveCD Script  (Read 1062 times)

Offline Mordakai

  • New Friend
  • *
  • Posts: 9
  • Don't anger the penguin...
[SOLVED] MyLiveCD Script
« on: July 02, 2010, 02:05:07 AM »
I'm in need of some help good friends.  I am trying to set up my laptop to run a MyLiveCD command (or script if you will) through CRON.  I wish to do this so that it will automatically backup my laptop once a month since I tend to forget.  I have read up on how to make a CRON script and it seems pretty straight forward and simple but for whatever reason the script I right does not work.  I place the script in the "/etc/cron.d" folder but with no luck.  I try to add it manually through "konsole" using the command "crontab /etc/cron.d/mylivecd_backup.sh" and then run "crontab -l" to confirm that it has been added.  This will, however, still not run the script when the time comes.  I wait for the time to come around when the script is supposed to run and wait for 1 minute later, then I check the temp folder that I have it save the data to and there is nothing in it.  I am at a loss to figure this one out.  I would be most grateful for any help that you fine people could provide.

This is my full script/command that I would normally input:
Code: [Select]
#!/bin/sh
58 23 28 * * root umount -a
58 23 28 * * root mylivecd --lzma --md5sum --nodir ^/home/robert/Downloads,^/home/robert/documents,^/home/robert/Games,^/home/robert/Movies,^/home/robert/Music,^/home/robert/Pictures --img /home/robert/mylivecd_pclos_[YYYY-MM-DD].iso

Thanks in advance everyone.
« Last Edit: July 07, 2010, 01:57:03 AM by Mordakai »
Processor - AMD Athlon 2650e
Memory - 3GB DDR2 667
Brand - Acer Aspire 5515 Series Laptop
Video - ATI Radeon X1200 Series (RS690M)
Hard Drive - Samsung HM500jj SATA
PCLOS version - MiniMe
Environment - KDE 4.5.5
Kernel - 2.6.37.2-pclos1.a64

Offline johnmart

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1105
  • Make Love Not War
Re: MyLiveCD Script
« Reply #1 on: July 02, 2010, 09:01:52 PM »
Hi Mordakai, welcome to the forum!

I have no experience with cron, but your script must be executable. Does cron generate your script & enable that? If not then right click /properties/permissions, check is executable will do it.

Did you test your cli in a konsole? the latest version of mylivecd automatically inserts md5sum & uses lzma by default so no need to use them, but they shouldn't interfere with it running.

Well, I know there is not much valuable input from me, but hopefully a cron user can show up & give you more knowledgeable advice. In the meantime you might search the software section of the forum for cron threads.

Welcome to PCLOS & the forum. Have fun!!  ;D ;D
John

p.s. maybe you found some helpsites like this
http://www.linuxhelp.net/guides/cron/
Acer Aspire, Intel core2 2.20GHz, ‎Graphics nVidia ‎G98M [GeForce G 105M], 2gb ram, Wireless Intel Link 5100

Why, any 5 year old child could understand this.
Somebody bring me a 5 year old.
Groucho

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: MyLiveCD Script
« Reply #2 on: July 03, 2010, 07:25:10 AM »
Before running mylivecd, it is recommended that you run umount -a, bleachbit and bleachbit-root.
The umount -a command unmounts any other partitions/drives (/data, etc). Bleachbit cleans up your system.
See:
http://www.pclinuxos.com/forum/index.php/topic,74418.0.html

Also, with your script as it is you will be including your first iso in your second attempt. I say attempt because it is approaching certainty (99.99%) that it will fail due to size issues. Including an iso file in an iso is not a good idea.


Offline menotu

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 15290
  • ┌∩┐(◕_◕)┌∩┐
Re: MyLiveCD Script
« Reply #3 on: July 03, 2010, 07:41:20 AM »
Have you considered using "regular" backup apps (something like Luckybackup or grsync etc) which can be scheduled to run at chosen times.

You may have a completely valid reason for doing it your way but it does seem overly complicated......

Oh, sorry, where are my manners. Welcome to the forum Mordakai.
PCLinuxOS 32bit KDE 4.10.1; kernel-3.4.11-pclos1.bfs & 64bit 3.2.18bfs; NVidia GeForce 8400GS 1GB 310.19 driver

Sony Vaio SVE1513A4ESI Laptop, Intel Core i5, 2.6GHz, 6GB RAM, 750GB, 15.6" Intel HD Graphics 4000

Offline Mordakai

  • New Friend
  • *
  • Posts: 9
  • Don't anger the penguin...
Re: MyLiveCD Script
« Reply #4 on: July 03, 2010, 03:03:03 PM »
I thank you all for the great input.  I didn't think to make the file executable so thank you very much for that bit of info.  As for the reason for using "MyLiveCD" I use it because it makes a "cd", but other than that there is no reason really.  I just have not found another program that will do the same thing and still wrap everything up in a nice little iso file.
I have verified that the script will run just fine if I run it through konsole so at least that much works.
As far as putting the ISO file at the end, it was my understanding that you could name the ISO that you wanted to produce and where you wanted to place it.

I once again would like to thank you all for your great advice and I am off to try out the new sugestions.  I will also look into the link that was provided and read more into the bleachbit option.

Thanks again everyone.

Robert
Processor - AMD Athlon 2650e
Memory - 3GB DDR2 667
Brand - Acer Aspire 5515 Series Laptop
Video - ATI Radeon X1200 Series (RS690M)
Hard Drive - Samsung HM500jj SATA
PCLOS version - MiniMe
Environment - KDE 4.5.5
Kernel - 2.6.37.2-pclos1.a64

Offline Mordakai

  • New Friend
  • *
  • Posts: 9
  • Don't anger the penguin...
Re: [SOLVED] MyLiveCD Script
« Reply #5 on: July 07, 2010, 01:59:53 AM »
I would like to thank everyone for their help in this venture.  I now have a working script and it would figure that now I have too much data for "mylivecd" to be of use.  I have taken the suggestion that I start using "LuckyBackup" and started familiarizing myself with the software.  After getting more adept at using the program I'm sure it will be more than satisfactory.  Thank you again everyone.


Robert
Processor - AMD Athlon 2650e
Memory - 3GB DDR2 667
Brand - Acer Aspire 5515 Series Laptop
Video - ATI Radeon X1200 Series (RS690M)
Hard Drive - Samsung HM500jj SATA
PCLOS version - MiniMe
Environment - KDE 4.5.5
Kernel - 2.6.37.2-pclos1.a64