Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2005-08-24 16:15:04

bauhouse
Archived Plugin Author
From: Abbotsford, BC Canada
Registered: 2004-06-29
Posts: 68
Website

Re: [plugin] [ORPHAN] rss_admin_db_manager - database backups and more

wilshire, thanks for the plugin. I really like the db manager and run sql tabs. It’s good not to have to flip back and forth between Textpattern and phpMyAdmin.

For Stephen Bau, you can link to http://www.builderscollective.com/ (although TextDrive currently has a server outage on their Bidwell server and the link is not currently working. I’m really looking forward to the hardware switch this week.)

I seem to be having a similar problem, different message, when trying to create an .sql file backup: BACKUP FAILED: file is empty. I am able to save a gzipped file, but when I examine the file, it is also empty. Any ideas?

Offline

#26 2005-08-24 16:49:42

swf
Plugin Author
From: Saskatoon, Saskatchewan Canada
Registered: 2004-06-21
Posts: 109
Website

Re: [plugin] [ORPHAN] rss_admin_db_manager - database backups and more

I’m able to create backups in either format but after I deleted some test entries and tried to restore the database with those entries it said t worked but did not restore the entries. I had to use mysqlfront to restore teh .sql file to my server. Is the restore working for other people?

Offline

#27 2005-08-24 17:19:03

heikki74
Member
From: Finland
Registered: 2004-08-17
Posts: 100

Re: [plugin] [ORPHAN] rss_admin_db_manager - database backups and more

Yes.. I can create backups in both formats. Restoring them works also.
I tried it with my test site with a couple of articles.

Offline

#28 2005-08-24 20:19:26

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

Re: [plugin] [ORPHAN] rss_admin_db_manager - database backups and more

A few notes…

  1. This has been tested for use with Textpattern 4.0 and above (as was supposed to be indicated by the plugin version number) but I falied to mentioned it otherwise. If you’re using an older version I can’t guarantee that it will work.
  2. If you’re having restore problems, the cause might be because of a bad backup. Download the backup and open the file to see if it contains an actual backup. It should be a series of SQL statements.
  3. If your backup or restore is failing, please post your TXP version/revision number, operating system and mysql version.

If you are getting a bad backup file and are able to email it to me, that would help as well.

Offline

#29 2005-08-24 20:28:16

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [plugin] [ORPHAN] rss_admin_db_manager - database backups and more

TXP 4.0, revision 819. Both .sql file and gzipped file are giving BACKUP FAILED: file not there, so I can’t test if restore is working ;)

MySQL 4.0.25
Apache 2.0.46

Dumb question: my OS or the server’s?

Thanks in advance.

Offline

#30 2005-08-24 21:26:54

swf
Plugin Author
From: Saskatoon, Saskatchewan Canada
Registered: 2004-06-21
Posts: 109
Website

Re: [plugin] [ORPHAN] rss_admin_db_manager - database backups and more

hmm it worked for me this time. Great plugin. I know I can use mysql front or phpmyadmin for backups but this is convenient to be able to do it form within txp.

Offline

#31 2005-08-24 21:42:49

bauhouse
Archived Plugin Author
From: Abbotsford, BC Canada
Registered: 2004-06-29
Posts: 68
Website

Re: [plugin] [ORPHAN] rss_admin_db_manager - database backups and more

Some Problems and a Suggestion

1. I have a local installation of Textpattern 4.0 (the deanload) working in Mac OS X 10.4 with MySQL v4.1.12-standard. I also have the identical Textpattern install on TextDrive where they have MySQL v4.1.13-log running. I made a backup of my database in phpMyAdmin, just in case. Then, I’ve been trying out the db manager plugin on both installs. The db backup does not work on the local install (see errors above), but for the TextDrive install, db backup works for both the .sql file and gzipped file methods.

2. The .sql file contains HTML from the db backup page:

3. The .sql.gz file comes up with an error when trying to dearchive the file in Mac OS X: (I will email this to you, wilshire.)

<pre>
Unable to unarchive “database_filename.sql” into “Desktop”. (Error 2 -No such file or directory.)
</pre>

The SQL queries are garbled, but the HTML at the end of the file reads just fine, even though it shouldn’t be there: Edit: oops! The HTML doesn’t render too well here as code. I’ll email the sql files to you, wilshire.

The suggestion is to add more information to your help page about how the plugin will save the files to the “files” directory defined as the File Uploads Path in the Textpattern Advanced Preferences and that the plugin reads the files available and automatically lists them. That way I can backup the database on TextDrive, download the file to my Desktop, drop the file into the “files” directory of my local Textpattern install where I can go to the db backup tab and see all the backup files dropped into the “files” directory listed according to database name and date and time of backup. Very cool!

If the above problems were fixed, I would say this is one of the best plugins ever written. Well worth the ransom. You truly are a genius, wilshire.

Last edited by bauhouse (2005-08-24 21:51:41)

Offline

#32 2005-08-24 22:26:22

bauhouse
Archived Plugin Author
From: Abbotsford, BC Canada
Registered: 2004-06-29
Posts: 68
Website

Re: [plugin] [ORPHAN] rss_admin_db_manager - database backups and more

One other thought: because the backup files are saved to the “files” directory, there is a potential security risk when that directory is not protected. If I protect it, all my downloads become inaccessible to the public. Can the backup directory be set to another directory where I can set some .htaccess security, or even better, a directory outside of public_html?

Offline

#33 2005-08-24 22:52:03

aba
Plugin Author
Registered: 2004-04-14
Posts: 119

Re: [plugin] [ORPHAN] rss_admin_db_manager - database backups and more

> bauhouse wrote:

> One other thought: because the backup files are saved to the “files” directory, there is a potential security risk when that directory is not protected. If I protect it, all my downloads become inaccessible to the public. Can the backup directory be set to another directory where I can set some .htaccess security, or even better, a directory outside of public_html?

“Options -Indexes” in a .htaccess might help.
I consider the names of the sql-Files wired enough so nobody stumbles over them because I only have them in that folder until I download them (and without Indexes someone needs to be quite good to guess the correct timestamp for the filename). Experience told me that saving a sql dump on the server that lost it’s data might be not the best idea…

But I have to admit, it would be nice to be able to give another path (changing the “BACKUP FAILED: file not there”-error message to something more understandable like “BACKUP FAILED: backup-path “.$backup_path.” does not exist” would be a nice touch as well. I think some people were a bit confused what the error message really meant…)

Offline

#34 2005-08-24 22:58:43

NeilA
Member
From: Blue Mountains, Australia
Registered: 2004-08-15
Posts: 316
Website

Re: [plugin] [ORPHAN] rss_admin_db_manager - database backups and more

Just for the record – installed the plugin on 4 TXP installs on Dreamhost, and thus far all create an error-free .sql and .gz file.

Haven’t tried restore yet, as I need to install the plugin on my testbed TXP

However, I would echo the desirability of being able to choose the directory the backup goes into.


Neil – Blue Mountains, Australia

http://westserve.org
http://ministrygrounds.net.au

Offline

#35 2005-08-25 09:32:01

steventer
Member
Registered: 2004-12-03
Posts: 56

Re: [plugin] [ORPHAN] rss_admin_db_manager - database backups and more

Doesn’t work for me; this is all I get in the downloaded file:

mysqldump Ver 8.23 Distrib 3.23.58, for pc-linux (i686)
By Igor Romanenko, Monty, Jani & Sinisa
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Dumping definition and data mysql database or table
Usage: mysqldump [OPTIONS] database [tables]
OR mysqldump [OPTIONS] —databases [OPTIONS] DB1 [DB2 DB3…]
OR mysqldump [OPTIONS] —all-databases [OPTIONS]

-A, —all-databases Dump all the databases. This will be same as —databases with all databases selected. -a, —all Include all MySQL specific create options. -#, —debug=… Output debug log. Often this is ‘d:t:o,filename`. —character-sets-dir=… Directory where character sets are -?, —help Display this help message and exit. -B, —databases To dump several databases. Note the difference in usage; In this case no tables are given. All name arguments are regarded as databasenames. ‘USE db_name;’ will be included in the output -c, —complete-insert Use complete insert statements. -C, —compress Use compression in server/client protocol. —default-character-set=… Set the default character set -e, —extended-insert Allows utilization of the new, much faster INSERT syntax. —add-drop-table Add a ‘drop table’ before each create. —add-locks Add locks around insert statements. —allow-keywords Allow creation of column names that are keywords. —delayed-insert Insert rows with INSERT DELAYED. —delete-master-logs Issue RESET MASTER on the master just after taking the dump, and before unlocking tables. This will automatically enable —first-slave. —master-data This will cause the master position and filename to be appended to your output, before unlocking tables. This will automatically enable —first-slave. -F, —flush-logs Flush logs file in server before starting dump. -f, —force Continue even if we get an sql-error. -h, —host=… Connect to host. -l, —lock-tables Lock all tables for read. —no-autocommit Wrap tables with autocommit/commit statements. -K, —disable-keys ‘/*!40000 ALTER TABLE tb_name DISABLE KEYS */; and ‘/*!40000 ALTER TABLE tb_name ENABLE KEYS */; will be put in the output. -n, —no-create-db ‘CREATE DATABASE /*!32312 IF NOT EXISTS*/ db_name;’ will not be put in the output. The above line will be added otherwise, if —databases or —all-databases option was given. -t, —no-create-info Don’t write table creation info. -d, —no-data No row information. -O, —set-variable var=option give a variable a value. —help lists variables —opt Same as —add-drop-table —add-locks —all —quick —extended-insert —lock-tables —disable-keys -p, —password[=…] Password to use when connecting to server. If password is not given it’s solicited on the tty. -P, —port=… Port number to use for connection. -q, —quick Don’t buffer query, dump directly to stdout. -Q, —quote-names Quote table and column names with ` -r, —result-file=… Direct output to a given file. This option should be used in MSDOS, because it prevents new line ‘\n’ from being converted to ‘\n\r’ (newline + carriage return). -S, —socket=… Socket file to use for connection. —tables Overrides option —databases (-B). -T, —tab=… Creates tab separated textfile for each table to given path. (creates .sql and .txt files). NOTE: This only works if mysqldump is run on the same machine as the mysqld daemon. -u, —user=# User for login if not current user. -v, —verbose Print info about the various stages. -V, —version Output version information and exit. -w, —where= dump only selected records; QUOTES mandatory! -X, —xml dump a database as well formed XML -x, —first-slave Locks all tables across all databases. EXAMPLES: “—where=user=‘jimf’” “-wuserid>1” “-wuserid<1” Use T (—tab=…) with —fields… —fields-terminated-by=… Fields in the textfile are terminated by … —fields-enclosed-by=… Fields in the importfile are enclosed by … —fields-optionally-enclosed-by=… Fields in the i.file are opt. enclosed by … —fields-escaped-by=… Fields in the i.file are escaped by … —lines-terminated-by=… Lines in the i.file are terminated by …

Default options are read from the following files in the given order:
/etc/my.cnf /var/lib/mysql/my.cnf ~/.my.cnf
The following groups are read: mysqldump client
The following options may be given as the first argument:
—print-defaults Print the program argument list and exit
—no-defaults Don’t read default options from any options file
—defaults-file=# Only read default options from the given file #
—defaults-extra-file=# Read this file after the global files are read

Possible variables for option —set-variable (-O) are:
max_allowed_packet current value: 25165824
net_buffer_length current value: 1047551

Offline

Board footer

Powered by FluxBB