For all those that helped, thank you, the script works great, and now will
zip the files in the directories I need it to, then move them to an archive
folder, thanks to
matthschulz [[EMAIL PROTECTED]]
and
Troy Denkinger [[EMAIL PROTECTED]]
who gave me the date portions with two seperate ideas that when put together
worked perfectly!
Thanks for the help people!
Now does any one know how I can make this able to be done from a web page,
then allow the user to begin downloading of any of the archived files?
IE. MY father-in-law a builder for my mud hates telneting in to the host, so
With CGI can I make a webpage for him with buttons on it like my script has
command options then he can back it up, and then download the areas all from
a web page.. I've no clue where to begin with this, but it's a linux server
with cgi enabled.
Sincerly,
Duston S. Horacek
>>>>>>>>> CUT BELOW >>>>>>>>>>>>>>>>
#! /usr/bin/perl -w
print "\n";
print "Please select a choice from the following menu.\n";
print "\n";
print "*-------------------------*\n";
print "| Press 1 to backup areas |\n";
print "| Press 2 to backup src |\n";
print "| Press 3 to backup pfiles|\n";
print "| Press 4 to backup All |\n";
print "| Press 5 to Exit |\n";
print "*-------------------------*\n";
print "\n";
my @now = localtime;
my $year = $now[5] + 1900;
## $year %= 100; # reduce to last two digits if you want
my $month = $now[4] + 1;
my $day = $now[3];
$backupdate = "$month-$day-$year";
chomp($input = <STDIN>);
if ($input eq '1') {
exec("tar -z -cf area.tgz ../Mud/area/ | cp area.tgz
archive/area_$backupdate.tgz");
} elsif ($input eq '2') {
exec("tar -z -cf src.tgz ../Mud/src/ | cp src.tgz
archive/src_$backupdate.tgz");
} elsif ($input eq '3') {
exec("tar -z -cf pfiles.tgz ../Mud/player/ | cp pfiles.tgz
archive/pfiles_$backupdate.tgz");
} elsif ($input eq '4') {
exec("tar -z -cf mudall.tgz ../Mud/ | cp mudall.tgz
archive/mudall_$backupdate.tgz");
} elsif ($input eq '5') {
exit
} else {
exec("./save");
};
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]