Re: Cron job for backup

2007-12-14 Thread Charles Jones
Couple of thoughts: cron jobs usually have a slightly different shell environment ($PATH, etc)...I suspect what was going wrong was it could not find the full path to dpkg or something like that. I would suggest additionally using the -p flag for your cp command, so that you preserve the file

Re: Cron job for backup

2007-12-13 Thread gm5729
Okay I got this cron job accomplished. The command I was going to use would not run properly in crontab most likely because of some unknown syntax problem. However, I did get a cron job going by making a simple script to run from cron instead. 0 [EMAIL PROTECTED]: ~ Fri Dec 14, 00:37 $ cat /usr/lo

Re: Scripting (was Re: Cron job for backup)

2007-12-11 Thread Lynn Newton
> > I've heard this a couple times now, but never had anyone explain why the > > $( ) format is preferred over the back quote in bash scripts. I have > > begun to try remembering to use the $( ) format in my scripts now, but I > > still find myself using back quotes quite often. So why is back quot

Re: Scripting (was Re: Cron job for backup)

2007-12-11 Thread der.hans
Am 11. Dec, 2007 schwätzte Matrix Mole so: der.hans wrote: Am 11. Dec, 2007 schwätzte Patrick Fleming, EA so: BACKUPDIRNAME=`date +Y%m%d%` #these are backtics - Use $( ) format for bash and ksh scripts :). BACKUPDIRNAME=$( date +Y%m%d% ) I've heard this a couple times now, but never had

Re: Cron job for backup

2007-12-11 Thread gm5729
Thanks guys. I thought it had to do something with the $() and date formats but wasn't quite sure. I used a program called keep which is really nice and easy and all gui for KDE but it hosed my whole usb partition and set up its own file structure and I don't know if it was full backups or just inc

Scripting (was Re: Cron job for backup)

2007-12-11 Thread Matrix Mole
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 der.hans wrote: > Am 11. Dec, 2007 schwätzte Patrick Fleming, EA so: > >> BACKUPDIRNAME=`date +Y%m%d%` #these are backtics - > > Use $( ) format for bash and ksh scripts :). > > BACKUPDIRNAME=$( date +Y%m%d% ) I've heard this a couple times now, b

Re: Cron job for backup

2007-12-11 Thread Matt Graham
After a long battle with technology, der.hans wrote: > Am 11. Dec, 2007 schwätzte Patrick Fleming, EA so: > > BACKUPDIRNAME=`date +Y%m%d%` #these are backtics - > Use $( ) format for bash and ksh scripts :). > BACKUPDIRNAME=$( date +Y%m%d% ) Better yet, BACKUPDIRNAME=$( date +%Y%m%d ) unless you h

Re: Cron job for backup

2007-12-11 Thread der.hans
Am 11. Dec, 2007 schwätzte Patrick Fleming, EA so: BACKUPDIRNAME=`date +Y%m%d%` #these are backtics - Use $( ) format for bash and ksh scripts :). BACKUPDIRNAME=$( date +Y%m%d% ) ciao, der.hans -- # https://www.LuftHans.com/http://www.CiscoLearning.org/ # A t-shirt a day keeps the

Re: Cron job for backup

2007-12-11 Thread Patrick Fleming, EA
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 BACKUPDIRNAME=`date +Y%m%d%` #these are backtics - mkdir /media/usbthingy/${BACKUPDIRNAME} cp -av /blah /media/usbthingy/${BACKUPDIRNAME} gm5729 wrote: > I am looking at trying to set up a cron job to do automatic backups of > my /home directory. I

Cron job for backup

2007-12-11 Thread gm5729
I am looking at trying to set up a cron job to do automatic backups of my /home directory. I want to do a full backup each time with no incremental backups. However I would like to use a date format for the main folder so it is easy to tell by looking at the usb hdd when it backed up last. How do