Cron job for backup

Patrick Fleming, EA plug at rwcinc.net
Tue Dec 11 07:15:34 MST 2007


-----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 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 I generate an auto-date to the end of a folder...
> 
> cp -av /blah /media/usbthingy/newfolderDATE
> 
> I would like the date to be yyyymmdd format.
> 
> Any ideas or suggestions would be appreciated. It would be great to
> just flip the switch to the usb hdd and forget about it. Let the
> computer do the work instead of futzing around with manual backups.
> 
> VampirePenguin
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss at lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHXpuFIFnqWH4u/3MRAmjnAJkBu64vl9eNYw6sfuza1x8RMS18ugCglpHK
NwT12dEvPWaLhWJdyfjl4p4=
=/AVA
-----END PGP SIGNATURE-----


More information about the PLUG-discuss mailing list