Web Hosting Talk







View Full Version : Simple Perl Script Needed.....


KaOtiC MiNd
12-03-2002, 09:26 PM
Can someone quickly write a script that i can setup with crontab..

i need it to `tar -cf /home/admin/backup.tar /home/sites/` then FTP /home/admin/backup.tar to ftp.server.com , user, pass, dir/backup-$TODAYS_DATE.tar............ill specify the ftp info once i get it, but please help people,i could do this in PHP but i dont know of any way to run it , as to crontab can just `perl /dir/to/this/script.pl`


---thx everyone, if you need i can hook you up with hosting, 100mb, 2gb tansfer (no free domain, sorry) unlim ftp, subdomains, cgi/php, etc.




===============MODS===============
I wasnt sure what forum to put this in, so please move it if its not in the right one :):-D

Jim_UK
12-03-2002, 09:28 PM
HAve a look at this: http://reoback.penguinsoup.org/

From the look of your requirements, this script will do everything you need + more.

Hope this helps :)

KaOtiC MiNd
12-03-2002, 09:32 PM
im so sorry, im looking for something extremely small, like 20-30 lines of code,

sasha
12-04-2002, 11:35 AM
Originally posted by KaOtiC MiNd
I could do this in PHP but i dont know of any way to run it , as to crontab can just `perl /dir/to/this/script.pl`

You do know that you can run php scripts like:
php /dir/to/this/script.php
if you have binary install of php? Right?
You can test by just typing that line in shell.

KaOtiC MiNd
12-04-2002, 07:22 PM
ok, thanx alot, i just found that out about 5 minutes before i checked this, i was thinking of perl, and then well, why isnt there a "php" function like "perl" and i tested it, and there was, so thx !!!