Forum Moderators: bakedjake

Message Too Old, No Replies

Simple Backup Script

         

weldonj

7:22 am on Jul 8, 2005 (gmt 0)

10+ Year Member



This should be simple but at 3 am I'm having trouble.

I just want a backup script that will backup my copy of homepage.php and name it homepageMMDDYY.php

I thought it was this but it doesn't seem to be working.

Am I doing something wrong? Thanks:

#! /bin/bash

currdate=`date +%y%m%d`
cp /www/homepage.php /www/homepage.$currdate.php

coopster

2:04 pm on Jul 8, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, weldonj.

cp /www/homepage.php /www/homepage$(date '+%m%d%y').php