<x-flowed>Mike Noyes, 2001-03-22 07:29 -0800
>As soon as I figure out the correct sed syntax for stripping admin and
>user passwords from our MySQL database, I'll make backups of our website
>public.

Everyone,
Here is a rough draft of a function I wrote for striping the user and
admin information from our database prior to archiving. Please review it.
Thanks.

get_db() {
   HOST=mysql.sourceforge.net
   DB=leaf
   USER=leaf
   umask 077
   mysqldump -h "$HOST" -u "$USER" -p --opt "$DB" > dbase/"$DB".sql
   sed -e '/LOCK TABLES users WRITE/,/UNLOCK TABLES;/d' dbase/leaf.sql | \
   sed -e "s%INSERT INTO authors VALUES.*%INSERT INTO authors VALUES 
('admin','ESS 
Admin','http://www.yourdomain.org','[EMAIL PROTECTED]','phpwebsite', 
63);%" > test.sql
}

--
Mike Noyes <[EMAIL PROTECTED]>
http://leaf.sourceforge.net/


_______________________________________________
Leaf-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/leaf-devel
</x-flowed>

Reply via email to