Tom wrote:
Here's a script I use to mirror catalog from one server to another. It could be modified to just create a backup.Hi, I would like to schedule a create catalog tar backup job from cron or possibly interchange via a job. Is there a command to do this, I looked in the interchange/bin directory, but could not see what to use. Also I could not find any documentation on interchange jobs, is this something that should be left to cron? Cheers,Tom _______________________________________________interchange-users mailing list suppressed http://www.icdevgroup.org/mailman/listinfo/interchange-users
===================================================== #!/bin/bash # $Id: download_catalog,v 1.1 2004/11/03 22:43:25 cvs Exp $ # # Downloads an Interchange catalog from the online version # DBNAME=$1 USERNAME=$2 STORENAME=$3if [[ "X$DBNAME" != "X" && "X$USERNAME" != "X" && "X$STORENAME" != "X" ]];then
ssh yourhostname "mysqldump -u root -ppassword --add-drop-table $DBNAME" | mysql -u root -ppassword $DBNAME
ssh yourhostname "tar -C /home/$USERNAME --exclude catalogs/$STORNAME/session \ --exclude catalogs/$STORNAME/error.log \
--exclude catalogs/$STORNAME/tmp \
--exclude catalogs/$STORNAME/logs \
--exclude
catalogs/$STORNAME/backup \
--exclude
catalogs/$STORNAME/orders -czf - catalogs/$STORNAME
www/htdocs/$STORNAME" | tar -C /home/$USERNAME -xzf -
else echo "Usage: download_catalog dbname username storename" fi ==================================================== This part of that script alone may do what you want: tar -C /home/$USERNAME --exclude catalogs/$STORNAME/session \--exclude catalogs/$STORNAME/error.log \
--exclude catalogs/$STORNAME/tmp \
--exclude catalogs/$STORNAME/logs \
--exclude
catalogs/$STORNAME/backup \
--exclude
catalogs/$STORNAME/orders -czf catalog.tar.gz \
catalogs/$STORNAME www/htdocs/$STORNAME
The script assumes the store is in /home in the structure /home/username/catalogs/storename and the web files are in /home/username/www/htdocs/storename
--
Sincerely,
Duane Hinkley
Down Home Web Design, Inc.
(208) 424-0572 Fax(208) 587-0738
suppressed
www.downhomewebdesign.com
_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.