Forum Moderators: coopster

Message Too Old, No Replies

Archive Directories using php

Want to run a php script via cron to Archive Directories

         

lasko

11:19 am on Nov 23, 2005 (gmt 0)

10+ Year Member



Task: Have weekly reports automatically ftp to our server then each week have the directory archived.

I'm not sure if I should do this using Shell or Php.

I will have the following structure

/dir/subdir/latest/

Every friday I want copy for each of the following directories

/dir/subdir/latest/

and move it to

/dir/subdir/todaysdate/
/dir/subdir/05_11_15/
/dir/subdir/05_11_08/

to keep an archive.

I'm trying to think if php would be best for this and have a cron setup to run the php script every friday etc or should I do it using Shell.

Any general thoughts appreciated.

lobo235

1:31 pm on Nov 23, 2005 (gmt 0)

10+ Year Member



I typically use PHP for stuff like this and then setup a cron job as you mentioned to run the PHP script. This is only because of my lack of knowledge when it comes to shell scripts. Either way will get the job done so I would just choose the method that will take the least amount of time.