Hi to all,
I am trying to automate the creation of mylivecd to create backup of my system using crontab.
The forms I am using at this time is as follows********
Root Crontab.....
0 * 1 * * /home/gerald/Desktop/Special-bits/Makelivecd
________________________________
#..................Makelivecd
#! /bin/bash
echo "Clearing workdir" >/home/gerald/Desktop/Special-bits/working
rm -rf /mnt/data2T/workdir/*
date >>/home/gerald/Desktop/Special-bits/working
echo "workdir cleared">>/home/gerald/Desktop/Special-bits/working
date >>/home/gerald/Desktop/Special-bits/working
df -h >>/home/gerald/Desktop/Special-bits/working
echo "making livecd or squasfs" >>/home/gerald/Desktop/Special-bits/working
date >> /home/gerald/Desktop/Special-bits/working
mylivecd --tmp=/mnt/data2T/temp --xz --workdir=/mnt/data2T/workdir --nodir=^/mnt,^/media /mnt/data2T/working-images/my64_`date %H%M%d%b%Y`.iso
date >> /home/gerald/Desktop/Special-bits/working
echo "workdir has not been cleared">>/home/gerald/Desktop/Special-bits/working
date >>/home/gerald/Desktop/Special-bits/working
echo "exiting now" >>/home/gerald/Desktop/Special-bits/working
exit
Timings for operation.
real 12m29.805s
user 42m13.848s
sys 0m51.697s
First----Is it possible to automate mylivecd using a cron job? and would the above work? If not, any ideas?,
I have run root cron job as I thought this would run mylivecd as root but apparently it does not.
second ---- in the timing section, what would I concider the total time for the operation? The sum of all or perhaps only user time?
Many thanks in advance for your thoughts,
Gezza
Looking through the mylivecd --help file I see no info on making 'mylivecd' run from a cron job, and use a root terminal.
Is this possible OR have I missed something?
Gezza