Archive
It! Pro
MySQL
Database Table Recovery
LEGEND:
|
Directory
|
HTML
File
|
Perl
Script
|
1.
Before configuring Archive It! Pro, you should
determine:
a. The full path
name of the zip application on your server
(typically /usr/contrib/bin/zip,
/usr/local/bin/zip, etc.)
b. The full path name of
your root web site (typically
/u/web/your_login/www, but this will highly
depend on how your hosting company has setup
your site root directory).
c. The full path name of
your cgibin directory (also desiginated as
cgi-bin, cgi-local and typically something like
/u/web/your_login/cgibin)
d. The name, user name
(login) and password to access your MySQL
database tables (if you wish to archive these
tables).
(Note: if you have
successfully run the archive_it_pro_test .cgi
script, then you have already completed Steps 2, 3
and 4 and can directly proceed to step
5)
2. Create the directory
Archive_It_Pro
somewhere on your site. IF POSSIBLE, this directory
should lie outside the path of your www directory.
Record the full path name of this directory
(typically something like
/u/web/your_login/Archive_It).
3. Create the directory
Archives
within the Archive_It_Pro
directory. Set the permissions on this directory to
777, which is read, write, execute for owner,
group, and all.
4. If you wish to archive any
MySQL Database tables, create the directory
DB_Tables
within the Archives
directory. Set the permissions on this directory to
777, which is read, write, execute for owner,
group, and all.
5. Upload the files
archive_it_pro.htm,
archive_it_pro_results.htm,
and
generic_message.htm
into the Archive_It_Pro
directory.
6. Open the Perl script
archive_it_pro_config.cgi
in a plain text
editor. Modify each of the five defined variables
with information appropriate for your web
site.
Specifically:
#your
chosen password to run the archive_it
script
$Password = "Your Chosen
Password";
# this
path is the full path of the Archive_It
directory which you created on your
site
$MasterArchiveDirectory =
"/u/web/your_login/Archive_It";
# this
path is the full path of your cgi directory
on your web site
$CGIDirectory =
"/u/web/your_login/cgibin";
# this
the http path to your cgi directory (called
through a browser)
$CGI_HTTP =
"http://www.YOUR_SITE.com/YOUR_CGI_BIN";
# this
path is the full path of the directory under
which all directories will be listed for
archiving
# it should be the upper most directory of
your web site
$TopDirectory = "/u/web/your_login/www";
# this
path is the full path to run the zip
application (can be just zip if the app is in
the default path of cgi
sessions)
$ZipPath = "/usr/contrib/bin/zip";
# this
variable states if you are using MySQL. Leave
it undefined or "" if no DB is being
archived
$DB_type = "MySQL";
# if
using a DB, then you must enter the database
name, user ID, and
password
$DB_Name = "DB_NAME";
$DB_User = "DB_USER";
$DB_Password = "DB_PASSWORD";
Save these
changes.
8. Upload the Perl scripts
archive_it_pro.cgi,
archive_it_pro1.cgi
and archive_it_pro_config.cgi
to the cgi directory of your web site.
9. Change the permissions on
each of these script files so that they will run on
your server (typically 755, which is read, write,
execute for owner, and only read and execute for
group and all others).
9. You are now all set to run
Archive It! Pro. You call the script directly from
your browser, such as:
http://www.mysite.com/cgibin/archive_it_pro.cgi
Provided everything has been
setup correctly you will see the Archive It! Pro
Directory/File and Database selection table.
The first time the script is
run, all Directories and Files in your root
directory and Database tables are selected
(checked). Uncheck any of those that you do not
wish to archive. You can also specify a specific
directory or file you wish to archive by entering
its full path name. Your top directory path is
shown as a starting template for fully specifying
this full path. After selecting all the files,
directories and database tables you wish to
archive, choose the number of archives you wish to
retain (the oldest archives over this number will
be automatically deleted and replaced with a new
archive). Finally, just enter your password and
click the Archive It! button. That's it!
The next time you wish to
archive your site you will just have to run the
script
http://www.mysite.com/cgibin/archive_it._pro.cgi
enter your password, and
click the Archive_It! button.
10. To create different
archive settings, just select the files,
directories and database tables you wish to
archive, give these settings a name, and click the
Archive It! button. Your new settings will be
saved. You can then return to these settings at any
later time by simply selecting these settings from
the popup menu.
11. To delete settings, just
select them from the popup menu, enter your
password, and click the Delete button. NOTE: you
cannot delete your default settings.
IMPORTANT: If you
could not place the Archive_It directory in a path
outside of your www path, then this directory (and
all of your archives) may be accessible to outside
intruders. For this reason you should either apply
.htaccess priviledges to the Archive_It_Pro
directory OR change the permissions on this
directory to 700 (read, write, execute only for the
owner) after you have created your
archives.
We also strongly
recommend that you routinely download the
latest of your archives for safekeeping on your
desktop machine.
MySQL
Database Recovery
1. Upload the file
archive_it_pro_db_recovery.htm
into the Archive_It_Pro
directory.
2. Upload the Perl scripts
archive_it_pro_db_recovery.cgi
and archive_it_pro_db_recovery1.cgi
to the cgi directory of your web site.
3. Change the permissions on
each of these script files so that they will run on
your server (typically 755, which is read, write,
execute for owner, and only read and execute for
group and all others).
4. Using a desktop Zip
(Unzip) application, unzip the MySQL database table
you wish to recover from a previously saved
archive. Tables will have the prefix "db_dump_" as
part of their name in the zipped
archive.
5. Upload each table dump
file you wish to recover into the directory
Archive_It_Pro/Archives/DB_Tables.
6. Run the script
archive_it_pro_db_recovery.cgi,
e.g.:
http://www.mysite.com/cgibin/archive_it_pro_db_recovery.cgi
You will see a list of all
recoverable MySQL tables. Check those you wish to
recover.
7. Enter your password and
click the Recover DB Tables button.
Your MySQL database table(s)
will be restored.
|