forum.coppermine-gallery.net

Support => cpg1.4 plugins => cpg1.4.x Support => Older/other versions => cpg1.4 plugin contributions => Topic started by: François Keller on January 21, 2007, 03:04:39 pm

Title: Backup: backup and restore the database
Post by: François Keller on January 21, 2007, 03:04:39 pm
Backup and restore de database

based on the XT Dump (http://www.dreaxteam.net) script with the agreement of the author
Use it carrefully. For the first use, make a backup with another tool like phpmyadmin in case of problem.
I've tested on my server and it works, but if a developper can have a look it will be better  ;)
I hope this plugin can help people who are searching a backup way without using external  tools like phpmyadmin.

What it is


This plugin is a simple way for backup and restore the Coppermine database directly from the admin menu:
there are three actions possible:
*Backup the database. The plugin will create a database dump in the /dumps/ folder on your server. You have the possibility to dowload the file on your computer
*Restore the database. The plugin restore the database from the dump on your server. 
*Managing the dump files on your server. You can download files on your local computer or delete old dump files from your server.

INSTALL


* Unpack the archive and upload the "backup" directory structure to your Coppermine
  gallery's plugins folder.
* Login as an admin, go to config, then "Manage Plugins"
* Find the backup entry in the available plugins and click install.
* When logged in as admin you will have a new admin menu button (backup/restore) to launch the process

USE


*Backup:  The plugin create a dump from your database in the /plugins/backup/dumps/ folder on your coppermine install (server)
          You can dowload the file on your computer (local) by clicking the button on end of the process
*Restore: The plugin restores your database with the dump file you choose in the dropdown list (all dump files in the /dumps/ folder)
          if you wish to use a backup file which is not present on your server, it will have to be placed in the backup plugin /dumps/folder  using the ftp
*Managing dump files:With this option you can manage the dump files in your backup plugin /dumps/ folder.
          You can dowload the files on your local installation or delete old files

Modifications
*Little correction in the gest.php file (thank's Hein for report)
*New 2.3 version (by Joachim Müller)       
LANGUAGE


The plugin comes with english and french language files
Italian translation added (thank's Angeldevil)
Dutch translation added (thank's Hein)
German translation added (thank's AlexL)
Persian
Croatian
Title: Re: Backup: backup and restore the database (experimental)
Post by: angeldevil on January 21, 2007, 07:40:29 pm
Hi Frantz, great job!

... my Italian language translation in attached file
Title: Re: Backup: backup and restore the database (experimental)
Post by: François Keller on January 21, 2007, 08:12:48 pm
Hi Angeldevil,

Thank's for your contribution.
I add your file in the pack
Title: Re: Backup: backup and restore the database (experimental)
Post by: Hein Traag on January 30, 2007, 02:41:36 pm
Nice work Frantz!

Dutch.php added to this post.

Kind regards,
Hein
Title: Re: Backup: backup and restore the database (experimental)
Post by: François Keller on January 31, 2007, 07:01:18 am
Thank's Hein,

your lang file is added in the pack in the first post
Title: Re: Backup: backup and restore the database (experimental)
Post by: Hein Traag on February 06, 2007, 12:08:51 pm
Frantz,

tested it on my work-in-progress CPG (the one with the large list of plugins  ;D) and it works.
Just one note to make and that is that it is nescesary the dumps folder to 777 so the script can
write the backup file into that folder.

One other things is that when i go to the manage part of the dump files i see the list of dumps i made and a word behind, it says Supprimer. I assume it says delete in some language. It is hardcoded into gest.php with no reference to a language file tag.

Regards,
Hein
Title: Re: Backup: backup and restore the database (experimental)
Post by: François Keller on February 06, 2007, 01:22:02 pm
Quote
One other things is that when i go to the manage part of the dump files i see the list of dumps i made and a word behind, it says Supprimer. I assume it says delete in some language. It is hardcoded into gest.php with no reference to a language file tag.
oups! i have forgotten to change this  :-[
will do this asp.

Thank's for report this
Title: Re: Backup: backup and restore the database (experimental)
Post by: bloodykiss on February 14, 2007, 07:55:59 am
Hello there !

Firstable, thanx for the plugin you made, I think it can be really usefull !

I have a problem... Here is what it says :

Template error
Failed to find block 'documentation'(#(<!-- BEGIN documentation -->)(.*?)(<!-- END documentation -->)#s) in :

                <div align="center">
                <table cellpadding="0" cellspacing="1">
                        <tr>
                                <td class="admin_menu"><a href="editpics.php?mode=upload_approval" title="">{UPL_APP_LNK}</a></td>
                                <td class="admin_menu"><a href="config.php" title="">{CONFIG_LNK}</a></td>
                                <td class="admin_menu"><a href="albmgr.php{CATL}" title="">{ALBUMS_LNK}</a></td>
                                <td class="admin_menu"><a href="catmgr.php" title="">{CATEGORIES_LNK}</a></td>
                                <td class="admin_menu"><a href="usermgr.php" title="">{USERS_LNK}</a></td>
                                <td class="admin_menu"><a href="groupmgr.php" title="">{GROUPS_LNK}</a></td>
                                <td class="admin_menu"><a href="banning.php" title="">{BAN_LNK}</a></td>
                                <td class="admin_menu"><a href="db_ecard.php" title="">{DB_ECARD_LNK}</a></td>
                                <td class="admin_menu"><a href="reviewcom.php" title="">{COMMENTS_LNK}</a></td>
                                <td class="admin_menu"><a href="searchnew.php" title="">{SEARCHNEW_LNK}</a></td>
                                <td class="admin_menu"><a href="util.php" title="">{UTIL_LNK}</a></td>
                                <td class="admin_menu"><a href="profile.php?op=edit_profile" title="">{MY_PROF_LNK}</a></td>
                        </tr>
                </table>
                </div>

Can you help me ?
I didn't save the backup 'cause I didn't know how to do it (that's why i installed your plugin)...
I hope it's not a too big problem.

Thank you !!!
Title: Re: Backup: backup and restore the database (experimental)
Post by: AlexL on February 14, 2007, 03:46:16 pm
Hello Frantz

German Lang File for your DB-Backup

LG
AlexL

(For files look to later post)
Title: Re: Backup: backup and restore the database (experimental)
Post by: François Keller on February 14, 2007, 08:34:43 pm
@ AlexL, Thank's, your file will be added in the pack

@bloodykiss,
what theme do you have on your gallery ?
Title: Re: Backup: backup and restore the database (experimental)
Post by: Hein Traag on March 09, 2007, 04:35:41 pm
Frantz,

not sure if i need to post this here or at Stramm's mod pack but i have his modpak installed on my private CPG with the Oranje theme. When i run the backup plugin you made it only goes halfway and then says only the word error.

Code: [Select]
USER:
------------------
Array
(
    [ID] => d6d317e8ccae72da826b565b89013be4
    [am] => 1
    [lang] => english
    [liv] => Array
        (
            [0] => 518
            [1] => 517
            [2] => 521
            [3] => 7
            [4] => 10
        )

    [sort] => da
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_name] => Hein
    [groups] => Array
        (
            [0] => 1
        )

    [disk_max] => 0
    [disk_min] => 0
    [can_rate_pictures] => 1
    [can_send_ecards] => 1
    [ufc_max] => 1
    [ufc_min] => 1
    [custom_user_upload] => 0
    [num_file_upload] => 10
    [num_URI_upload] => 0
    [can_post_comments] => 1
    [can_upload_pictures] => 1
    [can_create_albums] => 1
    [has_admin_access] => 1
    [pub_upl_need_approval] => 0
    [priv_upl_need_approval] => 0
    [group_name] => Administrators
    [upload_form_config] => 1
    [group_quota] => 0
    [can_see_all_albums] => 1
    [group_id] => 1
)

==========================
Queries:
------------------
Array
(
    [0] => SELECT extension, mime, content, player FROM cpg1410_filetypes; (0s)
    [1] => select * from cpg1410_plugins order by priority asc; (0s)
    [2] => delete from `*******`.cpg1410_sessions where time<1173450536 and remember=0; (0.002s)
    [3] => delete from `*******`.cpg1410_sessions where time<1172244536; (0s)
    [4] => select user_id from `*******`.cpg1410_sessions where session_id=md5("d2e7e3bed121f70f8aae2d495f845d7a1c469836f9164ac982aad2272b5d9de8"); (0s)
    [5] => select user_id as id, user_password as password from `*******`.cpg1410_users where user_id=1 (0s)
    [6] => SELECT u.user_id AS id, u.user_name AS username, u.user_password AS password, u.avatar_url AS avatar_url, u.enable_admin_email AS notify, u.auto_subscribe_post AS auto_subscribe_post, u.auto_subscribe_comment AS auto_subscribe_comment, u.user_group+100 AS group_id FROM `*******`.cpg1410_users AS u INNER JOIN `*******`.cpg1410_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' (0s)
    [7] => SELECT user_group_list FROM `*******`.cpg1410_users AS u WHERE user_id='1' and user_group_list <> ''; (0s)
    [8] => SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as  priv_upl_need_approval FROM cpg1410_usergroups WHERE group_id in (1) (0s)
    [9] => SELECT group_name FROM  cpg1410_usergroups WHERE group_id= 1 (0s)
    [10] => update `*******`.cpg1410_sessions set time='1173454136' where session_id=md5('d2e7e3bed121f70f8aae2d495f845d7a1c469836f9164ac982aad2272b5d9de8'); (0s)
    [11] => SELECT user_favpics FROM cpg1410_favpics WHERE user_id = 1 (0.001s)
    [12] => SELECT home,login,my_gallery,upload_pic,album_list,lastup,lastcom,topn,toprated,favpics,search FROM cpg1410_final_extract_config WHERE Group_Id=1 (0s)
    [13] => SHOW TABLES LIKE 'cpg1410_cms_config' (0.002s)
    [14] => SELECT * FROM cpg1410_cms_config (0s)
    [15] => SELECT count(*) FROM  cpg1410_pms WHERE owner=1 (0.001s)
    [16] => SELECT count(*) FROM  cpg1410_pms WHERE owner=1 AND showed='0' (0s)
    [17] => SELECT count(*) FROM  cpg1410_buddy WHERE user_id=1 (0s)
    [18] => SELECT count(*) FROM  cpg1410_buddy_req WHERE buddy_to=1 (0s)
    [19] => DELETE FROM cpg1410_banned WHERE expiry < '2007-03-09 15:28:56' (0s)
    [20] => SELECT * FROM cpg1410_banned WHERE (ip_addr='81.69.50.110' OR ip_addr='81.69.50.110' OR user_id=1) AND brute_force=0 (0s)
)

==========================
GET :
------------------
Array
(
    [file] => backup/backup
)

==========================
POST :
------------------
Array
(
    [act] => dodump
    [dbhost] => localhost
    [dbbase] => *******
    [dbuser] => *******
    [dbpass] => **********
    [LastTable] => -1
    [LastRow] => -1
    [selc] => on
    [tbls] => Array
        (
            [0] => cpg1410_albums
            [1] => cpg1410_banned
            [2] => cpg1410_bridge
            [3] => cpg1410_buddy
            [4] => cpg1410_buddy_req
            [5] => cpg1410_categories
            [6] => cpg1410_cms
            [7] => cpg1410_cms_config
            [8] => cpg1410_comments
            [9] => cpg1410_config
            [10] => cpg1410_dict
            [11] => cpg1410_ecards
            [12] => cpg1410_exif
            [13] => cpg1410_favpics
            [14] => cpg1410_filetypes
            [15] => cpg1410_final_extract_config
            [16] => cpg1410_hit_stats
            [17] => cpg1410_notify
            [18] => cpg1410_pictures
            [19] => cpg1410_plugins
            [20] => cpg1410_pms
            [21] => cpg1410_sessions
            [22] => cpg1410_temp_data
            [23] => cpg1410_usergroups
            [24] => cpg1410_users
            [25] => cpg1410_vote_stats
            [26] => cpg1410_votes
        )

    [SaveStruct] => 1
    [SaveData] => 1
    [ChkDropTable] => 1
    [ChckIfNotExists] => 1
    [FileName] => dump_*******_20070309
)

==========================
VERSION INFO :
------------------
PHP version: 5.1.6-pl6-gentoo - OK
------------------
mySQL version: 4.1.21-log
------------------
Coppermine version: 1.4.10 modpack v1(stable)
==========================
Module: GD
------------------
GD Version: bundled (2.0.28 compatible)
FreeType Support: 1
FreeType Linkage: with freetype
T1Lib Support: 1
GIF Read Support: 1
GIF Create Support: 1
JPG Support: 1
PNG Support: 1
WBMP Support: 1
XPM Support:
XBM Support: 1
JIS-mapped Japanese Font Support:

==========================
Module: mysql
------------------
MySQL Supportenabled
Active Persistent Links 5
Active Links 6
Client API version 4.1.21
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/run/mysqld/mysqld.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib64 -lmysqlclient 
==========================
Module: zlib
------------------
ZLib Support enabled
Stream Wrapper support compress.zlib://
Stream Filter support zlib.inflate, zlib.deflate
Compiled Version 1.2.3
Linked Version 1.2.3
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | Off | Off
safe_mode_exec_dir | no value | no value
safe_mode_gid | Off | Off
safe_mode_include_dir | no value | no value
safe_mode_exec_dir | no value | no value
sql.safe_mode | Off | Off
disable_functions | no value | no value
file_uploads | On | On
include_path | .:/usr/share/php5:/usr/share/php | .:/usr/share/php5:/usr/share/php
open_basedir | /kill-9.be/users/hop:/tmp/:/usr/share/php/:/usr/lib/php/ | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | no value | no value
sendmail_path | /usr/sbin/sendmail -t -i  | /usr/sbin/sendmail -t -i
SMTP | localhost | localhost
smtp_port | 25 | 25
==========================
Size and Time
------------------
Directive | Local Value | Master Value
max_execution_time | 30 | 30
max_input_time | 60 | 60
upload_max_filesize | 4M | 4M
post_max_size | 8M | 8M
==========================
Page generated in 0.13 seconds - 21 queries in 0.006 seconds - Album set : ; Meta set: ;

Not really a disaster but if you know how to solve it might be usefull to others who use Stramm's modpack combined with your DB backup plugin.

Cheers
Hein
Title: Re: Backup: backup and restore the database (experimental)
Post by: François Keller on March 10, 2007, 09:31:40 am
Hein,

I d'ont use the stramm mod pack. I really don't know hauw to find why this error comes...
Title: Re: Backup: backup and restore the database (experimental)
Post by: Hein Traag on March 11, 2007, 03:47:29 pm
:) was worth a shot.
Title: Re: Backup: backup and restore the database (experimental)
Post by: AlexL on March 22, 2007, 02:41:33 pm
Hello Frantz

now - after my first use the backup PlugIn - I have minor corrections for the german.php - see attached.
Furthermore I have translated the README to a german liesmich.txt and completed this and the Readme with the chmod777 tip

And a little bug the "Return to backup menu" button dosn't work
And if you are looking for a little job ;) change the suggested filename from the DB-Dump-File
from dump_%username%sql2_%date%.sql to dump_sql2_%date%_%time%.sql.           
Because of I know my username - but I make more than one dump a day when I make modifications.

Greetings
AlexL
Title: Re: Backup: backup and restore the database (experimental)
Post by: François Keller on March 22, 2007, 07:54:40 pm
Thank's AlexL, will add your contribution in the pack asp
Title: Re: Backup: backup and restore the database (experimental)
Post by: su_ict on June 12, 2007, 11:27:13 am
Installed - tested and works like a charm ! AFAIK the experimental can be removed  8)

Hein (Dutch transl) : the button in the first screen of this mod states "connect" as title - maybe change it to "uitvoeren" oid in the dutch language file ?!?
Title: Re: Backup: backup and restore the database (experimental)
Post by: Hein Traag on June 12, 2007, 11:42:04 am
Installed - tested and works like a charm ! AFAIK the experimental can be removed  8)

Hein (Dutch transl) : the button in the first screen of this mod states "connect" as title - maybe change it to "uitvoeren" oid in the dutch language file ?!?

I agree on removing the experimental tag.
I updated the dutch.php a bit and added it to this post.

Hein
Title: Re: Backup: backup and restore the database (experimental)
Post by: su_ict on June 12, 2007, 02:00:22 pm
I updated the dutch.php a bit and added it to this post.

Hein

Thx Hein - active as we speek  :o 8)
Title: Re: Backup: backup and restore the database (experimental)
Post by: superdave on June 12, 2007, 08:30:51 pm
definitely not experimental ... i just installed it and backed up my database, no problems!!!  :)  :D

i hope you don't mind, but in the backup menu, you should make a small correction:

Quote
Click for select all teh tables

change to

Quote
Click to select all tables

GREAT PLUGIN!!
Title: Re: Backup: backup and restore the database (experimental)
Post by: François Keller on June 13, 2007, 07:44:29 am
Quote
definitely not experimental ... i just installed it and backed up my database, no problems!!!  Sourire  Souriant
I'm happy for you  ;)
Thank's for reporting the typo in the langage file. I'll change it asp.
@ HEIN I'll update the pack asp with your new dutch lang file.
Title: Re: Backup: backup and restore the database (experimental)
Post by: MatthewSchenker on June 27, 2007, 03:45:42 pm
This seems like a great plug-in.  But I am having a problem.

When I run the backup, I get this error:

ERROR !

No table selected. You have to select at least one table.



I get this error, even when I have this selected:

Click for select all teh tables

Please help!
Title: Re: Backup: backup and restore the database (experimental)
Post by: Brane29 on June 27, 2007, 04:00:31 pm
One question before i use this. I have installed CPG in the same database as joomla, with diferent table prefix. Will this backup onely cpg1410_ prefix or whole database.

Thanx
Title: Re: Backup: backup and restore the database (experimental)
Post by: François Keller on June 28, 2007, 08:10:02 am
Quote
Will this backup onely cpg1410_ prefix or whole database
You can choose the tables you want to backup
Title: Re: Backup: backup and restore the database (experimental)
Post by: Hein Traag on June 28, 2007, 08:33:07 am
Frantz.. when is the experimental bit going to be erased from the plugin name ? I think it has proven itself by now  ;)
Title: Re: Backup: backup and restore the database (experimental)
Post by: François Keller on June 28, 2007, 10:27:10 am
Hein, you're right, but i know that the plugin don't work with some webservers. The users must test it befor using without other backup possibility
Title: Re: Backup: backup and restore the database (experimental)
Post by: MatthewSchenker on June 28, 2007, 03:12:25 pm
Frantz.. when is the experimental bit going to be erased from the plugin name ? I think it has proven itself by now  ;)

Did you see my post above?  Clearly, there are still problems with this plug-in, as my experience shows.  Also, I don't see any answers on how to fix the problem.  So it does seem to be experimental.

The word "experimental" should remain in the name until the problems are fixed, don't you think?
Title: Re: Backup: backup and restore the database
Post by: François Keller on June 28, 2007, 06:33:40 pm
Quote
Did you see my post above?
yes !
Quote
Clearly, there are still problems with this plug-in, as my experience shows
as i said befor, i know that the plugin don't work correctly on some intallations.
It's difficult for me to find how to fix your problem my knowledge in programming are limited (it's not my job)
also, if a real codder  can have a look he is welcome....
Title: Re: Backup: backup and restore the database
Post by: MatthewSchenker on June 28, 2007, 06:42:30 pm
...i know that the plugin don't work correctly on some intallations.

That's why I think it's still "experimental."  The support people here in this forum, like GauGau, get angry at newbies who complain when an "experimental" plug-in causes problems.  And yet, you want to stop calling something experimental, even when it causes problems.

From a support perspective, it seems better if you kept a plug-in listed as "experimental" until it isn't so buggy.

Thank you for your help.  I appreciate it!
Title: Re: Backup: backup and restore the database
Post by: will on June 28, 2007, 08:00:15 pm
Just installed this and it works great ;D
Title: Re: Backup: backup and restore the database
Post by: MatthewSchenker on June 29, 2007, 02:53:09 pm
It seems like this works well for some people.

Can someone who got this plug-in to work please comment on the errors I am receiving.  For convenience, here is a description of what happens...

When I try to use the backup plug-in, I receive this error:

ERROR !

No table selected. You have to select at least one table.



This error occurs even when I have selected all the tables:

Click for select all teh tables



Any help would be greatly appreciated, as I do want to have a reliable way to do gallery backups.
Title: Re: Backup: backup and restore the database
Post by: Hein Traag on June 29, 2007, 02:58:27 pm
Matthew could you please grow some patience. Your asking for support but forgetting that none of us is getting paid to do it. So do not count in days before expecting a answer but rather in week(s).

And you are forgetting to add some details in your request which might help Frantz to get a fix. Details such as where are you hosted ? What is the url to your site ? Did you ask your hoster if there are any restrictions on your access to mysql. The more details the sooner a answer might present itself.
Title: Re: Backup: backup and restore the database
Post by: MatthewSchenker on June 29, 2007, 03:11:21 pm
Hein,
Just trying to keep the conversation on this topic going, since I'm sure other Coppermine users are also interested in this.

My Web host is Charlottezweb (http://www.charlottezweb.com).  I have not experienced any other mysql limitations from them.  I run mysql backup utilities on other software, such as SMF.  But maybe there's something different about the "backup and restore" utility on CPG?

PS: I'm not sure what you mean by "grow some patience."  I really don't understand why the experts around here are so unfriendly.
Title: Re: Backup: backup and restore the database
Post by: François Keller on June 29, 2007, 04:15:54 pm
Quote
ERROR !

No table selected. You have to select at least one table.


This error occurs even when I have selected all the tables:

Click for select all teh tables
did you try with one or two selected tables ?
As said befor by Hein, it's difficult to help someone without more détails. I've installed the plugin on three differents servers without problems. I cannot replicate your error  :-\
it's possible you have a server restriction....
Quote
I really don't understand why the experts around here are so unfriendly.
Hein is'nt unfriendly, he just explain why you don't have a response at your problem
Title: Re: Backup: backup and restore the database
Post by: MatthewSchenker on June 29, 2007, 04:21:55 pm
Frantz,
It does not give me the option of selecting just one or two tables.  The only option I have is:
Click for select all teh tables

That might indicate an issue.  Maybe I need to re-install this and try again?

PS:  Where I come from, telling someone to "grow some patience" is unfriendly.  But never mind.
Title: Re: Backup: backup and restore the database
Post by: François Keller on June 29, 2007, 05:14:17 pm
Quote
That might indicate an issue.  Maybe I need to re-install this and try again?
Yes it's a good idea
Title: Re: Backup: backup and restore the database
Post by: Joachim Müller on June 29, 2007, 05:46:52 pm
OK, I'll have a look at the plugin.

Frantz, the original XTDump-Site appears to be down. All I could find when googling for it was a modified version 0.5. Do you have a more recent unmodified version of XTDump available?
Title: Re: Backup: backup and restore the database
Post by: François Keller on June 29, 2007, 06:47:38 pm
GauGau,

Thank's for looking in this plugin, I'll look if i have the original script (my computer crash and some files are lost  :-\)
I've found a 0.7 version (attached)
Title: Re: Backup: backup and restore the database
Post by: Brane29 on June 30, 2007, 12:22:48 am
It works great for me. Thanke you.
Belove is my little contribution to croatian users. I translate this plugin to croatian!
You are fre to put it to plugin lang folder if you think that it's ok!

Greatings to all from Croatia!
Title: Re: Backup: backup and restore the database
Post by: François Keller on June 30, 2007, 09:29:34 am
Brane29,
Thank's for your contribution. Your lang file will be added in the pack asp

GauGau,

Sorry, I have not found more recent XT dump script that the 0.7 version  :-\
Title: Re: Backup: backup and restore the database
Post by: Joachim Müller on June 30, 2007, 11:56:19 am
That's fine by me - 0.7 is more recent than the hacked 0.5 version that I was able to find googling for it. I'll look into this next week. Do you have any idea what license the script came with? I'd love to package it with cpg1.5.x if the license fits.

Joachim
Title: Re: Backup: backup and restore the database
Post by: François Keller on July 02, 2007, 08:45:18 am
GauGau,

I don't know exactly what licence the scritp has.but i've found this http://www.01php.com/fiche-scripts-18.html (http://www.01php.com/fiche-scripts-18.html) if it can help you. I also had a mail from the author (but sorry, i've lost it in my computer crash) who was  ok for using the script in coppermine. I've seen that some BBS (PhpBB) used this script to backup...
The dreaXTeam sit is under construction http://dreaxteam.net/ (http://dreaxteam.net/)
Title: Re: Backup: backup and restore the database
Post by: Joachim Müller on July 09, 2007, 10:38:24 am
Hello all,

as suggested above I have looked into the backup plugin and changed several things. I have packaged it and attached it to this posting. Experienced users are welcome to download and test it.
Most changes are cosmetical, none of the changes is drastical in terms of core functionality.

This is the content of the changelog:
2007-07-09 Released version 2.0 of the backup plugin for testing
2007-07-08 Added check if target folder is writtable {GauGau}
2007-07-08 Added Warning text for restores {GauGau}
2007-07-08 Preselected coppermine tables for dump creation {GauGau}
2007-07-08 Fixed improperly nested tables {GauGau}
2007-07-07 Added links to announcement thread and original XT-Dump homepage (currently down) {GauGau}
2007-07-07 Moved plugin stylesheet into <head>-section where it belongs {GauGau}
2007-07-07 Added global header and footer include {GauGau}
2007-07-07 Added check for gallery admin mode as a safety precaution {GauGau}
2007-07-06 Moved version var from language file to config file {GauGau}
2007-07-06 Cleaned up a bit for version 2.0: $LANG-array replaced {GauGau}
2007-06-30 Croation translation added {Brane29}
2007-06-13 Version 1.6 released {Frantz}
2007-06-12 Dutch translation improved {Hein}
2007-02-14 Version 1.5 released {Frantz}
2007-03-22 German translation fixed {AlexL}
2007-02-14 Version 1.4 released {Frantz}
2007-02-14 German translation added {AlexL}
2007-02-06 Version 1.3 released {Frantz}
2007-02-06 Replaced hard-coded word with translation {Hein}
2007-01-31 Version 1.2 released {Frantz}
2007-01-30 Dutch translation added {Hein}
2007-01-21 Version 1.1 released {Frantz}
2007-01-21 Italian language added {Angeldevil}
2007-01-21 Version 1.0 - Initial release {Frantz}

@Frantz: please don't replace the version in the initial posting yet - let's test this version first thoroughly.

Things testers should be particularly mindfull off: I haven't tested the progress bars thorougly, as I haven't run this script on a large install yet. I haven't tested the restore feature thoroughly.

The additional language strings I have added shine through in English for the languages that I can't speak; translations would be welcome.

Please review and report. I'd love to see this plugin bundled with cpg1.5.x - please help us make it production-ready.

@Frantz: could you please contact the original author once more and ask for permission to bundle it with cpg1.5.x? Thanks in advance.

Cheers

Joachim
Title: Re: Backup: backup and restore the database
Post by: Hein Traag on July 09, 2007, 12:59:33 pm
Tested plugin on two different servers where i use cpg. Both tested clean and perfect.

Added 'plugin_manager' => 'Plugin Manager', to dutch.php. It was missing and caused a texless button to appear next to the button you can click to go to the plugin support thread.

One request to make. I made several test dumps while testing the plugin and setting a different colour for the progress bar in the css file. I now have to delete each one seperatly. Would it be possible to add radio buttons so one could delete several dump files in one go ?

Attached updated dutch.php for 2.0 plugin. And it would indeed make a very nice add-on for the upcoming 1.5 cpg!

Hein
Title: Re: Backup: backup and restore the database
Post by: François Keller on July 09, 2007, 09:05:22 pm
GauGau,
Thank's for this 2.0 version.
I will test it asp.
Quote
@Frantz: please don't replace the version in the initial posting yet - let's test this version first thoroughly.
OK
Quote
@Frantz: could you please contact the original author once more and ask for permission to bundle it with cpg1.5.x? Thanks in advance.
I will see if i can find the email adress from the original author. I let you know the answer...
Title: Re: Backup: backup and restore the database
Post by: su_ict on July 10, 2007, 02:31:28 pm
Got the files, need to set up a test coppermine (had to do this someday anyway  ;D) and will test it - results will show up in this thread.
Title: Re: Backup: backup and restore the database
Post by: François Keller on July 10, 2007, 09:12:51 pm
Tested an working like a charm on my local server and on my web server (free.fr)
new french.php file attached
Title: Re: Backup: backup and restore the database
Post by: Joachim Müller on July 11, 2007, 08:33:42 am
Thank you both for your language file updates. I have added the feature "delete several files at once" to the plugin and added some other improvements. Attached, you will find version 2.1 of the plugin. As suggested above, the plugin should be tested some more, preferably using a large coppermine install with a huge database.

Things that are left to do: backing up your database is important and can be achieved using this plugin. However, if the database is broken and needs to be restored from a backup, the coppermine user interface might be broken as well. Subsequently, newbies can't restore the database using the plugin (which requires the coppermine user interface to be up). That's why I plan to implement a standalone file for restoring the dump. I'm not sure though if this will go into the plugin (because I'm not sure how to accomplish this permissions-wise) nor when I will have the time to look into this, so don't expect such a file in the near future.

Please test the plugin thoroughly and report your feedback.

Cheers

Joachim

P.S. I developed my improvements on my cpg1.5.x testbed, so the plugin should already be ready to run with the future version ;).
Title: Re: Backup: backup and restore the database
Post by: François Keller on July 11, 2007, 08:46:12 am
Quote
I developed my improvements on my cpg1.5.x testbed, so the plugin should already be ready to run with the future version
Hey good news  ;)
Quote
That's why I plan to implement a standalone file for restoring the dump
Yes, surelly a good idea for newbies and for other users  ;D

I'll test the new version
Title: Re: Backup: backup and restore the database
Post by: Hein Traag on July 11, 2007, 09:21:53 am
Tested 2.1 on my private cpg and two other cpg's i am working on. The largest being 2500+ pictures , not a big one but bigger then my own ;)

Test was a 100% clean. The radio buttons are a big plus. Now deleting multiple dump files is as easy as riding a bike, thanks GauGau.

Added dutch.php , some minor cosmetical language editing.

And i agree with GauGau that it would be a good idea to have this as a standalone page for when your cpg is really gone belly up. I am not sure but i think i saw Lycos (ISP) provide XT-dump to its users as a standalone page.

Hein
Title: Re: Backup: backup and restore the database
Post by: Sami on July 11, 2007, 09:56:13 am
I didn't test new version yet ! But I'll  ;D

here is Persian language file
and also there is a missing parenthesis on English lang file line #34

Sami
Title: Re: Backup: backup and restore the database
Post by: su_ict on July 11, 2007, 03:21:55 pm
Hmm, i stated i had to put a test coppermine running beside my production version but now i am a bit stuck and confused  :-[

What is the easiest way to setup a development (or call it test) environment to test this new plugin ? How would you do it ? Restriction - i am working on a company PC so installing at localhost is not possible - i have full control over our site management however.

Ps. if this is not for this thread, i will open a new one - if the answer is somewhere in the forum, be so nice to point me there - i have been over it searching and could not find it.
Title: Re: Backup: backup and restore the database
Post by: Hein Traag on July 11, 2007, 03:49:00 pm
 ;) you guessed right, what you are asking is not ment for this thread. I can't do anything within the plugin contributions part of the board otherwise i would have moved it to here http://forum.coppermine-gallery.net/index.php?board=47.0 (http://forum.coppermine-gallery.net/index.php?board=47.0)

But this might be something you can use, it's the CPG live demo. I am not sure if you can run plugins in that demo as wel.
You can find the live demo here http://forum.coppermine-gallery.net/index.php?topic=34418.0 (http://forum.coppermine-gallery.net/index.php?topic=34418.0)
Title: Re: Backup: backup and restore the database
Post by: François Keller on July 11, 2007, 03:50:53 pm
Version 2.1 tested without problem on my webserver (dump file is 1.8 MO)
French.php file modified according this new version
Title: Re: Backup: backup and restore the database
Post by: su_ict on July 11, 2007, 03:58:55 pm
At first - Hein thx for the quick reply  8)

;) you guessed right, what you are asking is not ment for this thread. I can't do anything within the plugin contributions part of the board otherwise i would have moved it to here http://forum.coppermine-gallery.net/index.php?board=47.0 (http://forum.coppermine-gallery.net/index.php?board=47.0)
Maybe someone else can move it ? Or indicate i should really open a new thread  ::) ;)
Quote from: Hein
But this might be something you can use, it's the CPG live demo
I saw that one - as stated in the descr. it is not a real installation so i imagine a plugin install is not be possible at least not desirable !
Title: Re: Backup: backup and restore the database
Post by: Joachim Müller on July 11, 2007, 05:27:32 pm
I am not sure if you can run plugins in that demo as wel.
Sure you can - the live demo is a full apache webserver. In fact my development system is based on the live demo (it's portable, I can take it with me on a stick).
However, as you suggested: su_ict's question doesn't belong into this thread. The live-demo goes unsupported, so I won't answer further questions on it - the only thing I can do is to recommend using it, especially for testing purposes.

Joachim
Title: Re: Backup: backup and restore the database
Post by: su_ict on July 11, 2007, 07:27:43 pm
Sure you can - the live demo is a full apache webserver. In fact my development system is based on the live demo (it's portable, I can take it with me on a stick).

Slightly off-topic - thanks GauGau - will step into it  ;D 8)
Title: Re: Backup: backup and restore the database
Post by: su_ict on July 17, 2007, 12:16:40 pm
Ok, tested 2.1 version and works ok, thx !

@Hein - ducth language version - when dump is done - following line is put above a link to the dump file -
(dutch - Je vindt de backup bestanden hier. Ook kun je ze hier downloaden.:)

More accurate (  ??? ) looks to me :
(dutch - De backup file kan hier gedownload worden : )

Just a thougt  ;)

*added 19/07 *
String DELETE_FILE_OK should be modified to : Bestand %s is/zijn verwijderd
Title: Re: Backup: backup and restore the database
Post by: AlexL on July 23, 2007, 05:28:19 pm
Hello

tested v 2.1  ;D after a little confusion causes from the UpdateHistoryPlugIn (after installation of Backup V2.1 this wasn't show on PlugInsManager - uninstalled the UpdateHistoryPlugIn and it's V2.1 is back and ok)
Save DB without errors - maybe a little beauty error - it's shows 0% after a correct save.
But then I find a little problem :'( - maybe it's not a problem of the plugin rather a mismatch on my db

I've testet the restore function and got the following error after 80%
Code: [Select]
Query Error Line 109
Error :You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '23:42:13,NULL,NULL)' at line 1

INSERT INTO `cpg132_cms` VALUES(1,0,'Willkommen bei Velvet Photos','<p>Schickt mir Euer Feedback und Eure Anregungen - nutzt das <a href="http:\/\/www.velvet-photos.de/kontakt.php">Kontakt-Formular</a>. Es werden bald neue Fotos hier erscheinen. Schaut immer mal wieder vorbei.</p>',0,0,2007-04-14 23:42:13,NULL,NULL);
Query Error Line 110
Error :You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '16:31:28,NULL,NULL)' at line 1

INSERT INTO `cpg132_cms` VALUES(4,11,'Lautenfestival - Ein zusätzlicher Hinweis','Die Bands Asfur und IOCULATORES traten im Rahmen dieses Festivals auf - die Fotos dazu finden Sie hier und&nbsp;in der Kategorie Konzertfotos, dann unter dem Namen der jeweiligen Band.',1,1,2007-03-14 16:31:28,NULL,NULL);
Query Error Line 111
Error :You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '21:55:18,NULL,NULL)' at line 1

INSERT INTO `cpg132_cms` VALUES(5,0,'test2','Test2',1,3,2007-01-01 21:55:18,NULL,NULL);
Title: Re: Backup: backup and restore the database
Post by: François Keller on July 23, 2007, 06:01:04 pm
Hi, i had a similar problem with the tables create by the minicms plugin.  :-\
Title: Re: Backup: backup and restore the database
Post by: Nibbler on July 23, 2007, 08:21:17 pm
Problem is probably here, in dump.php

Code: [Select]
if ($type == 'tinyint' || $type == 'smallint' || $type == 'mediumint' ||

$type == 'int' || $type == 'bigint'  ||$type == 'timestamp')

That code is causing the timestamps not to be quoted, which is incorrect. Remove timestamp from that bit and remake the dump.
Title: Re: Backup: backup and restore the database
Post by: Joachim Müller on July 30, 2007, 09:41:11 am
Rolled the suggested changes into a new version - please test and report.
Title: Re: Backup: backup and restore the database
Post by: François Keller on July 30, 2007, 11:13:12 am
tested on my local gallery without problems (but not tested with minicms plugin tables)
attached updated french.php file
Title: Re: Backup: backup and restore the database
Post by: AlexL on July 30, 2007, 04:41:15 pm
cant test at this time - i test asap and call back
Title: Re: Backup: backup and restore the database
Post by: su_ict on July 31, 2007, 10:02:28 am
Downloaded and installed 2.2 .
Minor things :
More testing in process  ;)
Title: Re: Backup: backup and restore the database
Post by: AlexL on July 31, 2007, 10:49:43 am
Hello

Now tested

After Backup message "Sicherung komplett" but 0% is shown
After Restore message "Wiederherstellung komplett" but 78% is shown
No error messages from cms or others.
What's the truth 78% or completed?
I've take a phpmyAdmin Backup before and after this action and then I've compared this files with Winmerge - all ok

An extra BackupRestore.php for restores with corrupt db's or PlugInConfigs is very helpfull - i hope next version come with this.
But if reachable from public internet then a password questioning is needed - to prevent the everybody from restore my db to an old version
Title: Re: Backup: backup and restore the database
Post by: su_ict on July 31, 2007, 11:49:50 am
Testing - in Select table to process form i saw that my Table Prefix is cpg1410 but my release is 1412 - oopsie - whats going on  :o  :o Checked - contra checked - read dump php files - checked again - pfoe.
At last i found out :
  Nothing to be concerned about : See thread - http://forum.coppermine-gallery.net/index.php?topic=45230.0 - table prefix is not updated to 1412 - works as designed !

Thought is was best to put it here before anyone else stumbles upon this  ;)
Title: Re: Backup: backup and restore the database
Post by: su_ict on July 31, 2007, 11:52:19 am
But if reachable from public internet then a password questioning is needed - to prevent the everybody from restore my db to an old version
You mean an extra check besides the fact that user is Admin ? If so - i second this request !
Title: Re: Backup: backup and restore the database
Post by: Joachim Müller on August 01, 2007, 08:21:45 am
But if reachable from public internet then a password questioning is needed - to prevent the everybody from restore my db to an old version
You mean an extra check besides the fact that user is Admin ? If so - i second this request !
And what password are you going to check? Coppermine's admin password that is being stored in the database? Obviously not, as you're trying to restore a crashed database, so you can't check for the admin password.
I'm aware that there needs to be some method of authentification before a restore could possibly be performed:
I'm not sure though if this will go into the plugin (because I'm not sure how to accomplish this permissions-wise)
In my opinion I have the following options to accomplish authentification: Both options have drawbacks.

An extra BackupRestore.php for restores with corrupt db's or PlugInConfigs is very helpfull - i hope next version come with this.
I doubt that the next version will contain a standalone restore - I already said so:
I'm not sure though [...] when I will have the time to look into this, so don't expect such a file in the near future.
You're welcome to come up with a suggestion if you have the time.

Testing - in Select table to process form i saw that my Table Prefix is cpg1410 but my release is 1412 - oopsie - whats going on  :o  :o Checked - contra checked - read dump php files - checked again - pfoe.
At last i found out :
  Nothing to be concerned about : See thread - http://forum.coppermine-gallery.net/index.php?topic=45230.0 - table prefix is not updated to 1412 - works as designed !

Thought is was best to put it here before anyone else stumbles upon this  ;)
As suggested in the thread you refered to: the prefix is just a name that you deliberately chose when installing Coppermine in the first place. Yours is a PEBCAK issue, sorry. Your remark is in no way related to this thread. Please keep the discussion about the table prefix to the thread you refered to - don't cross-post.

Joachim
Title: Re: Backup: backup and restore the database
Post by: AlexL on August 01, 2007, 09:39:38 am
Hello Joachim

I know that you have already pointed to the permission problem - I only have loud think about this problem, to animate the others to bring ideas. The Die-Statment you think to change per ftp? And the risk to leave it on after restore? The mysql access - maybe the Coppermine-Admin don't have the password, because the hoster make all this things for him? But for vulnerability it may be the better way to use this existing way, because the mysql team keeps this sure.
Quote
You're welcome to come up with a suggestion if you have the time.
To come with suggestions - I do my very best ;)
But to realize this - is for me not a time problem rather then a problem of knowledge. Sorry but I can't code anything. And if I find time then I had to do a translation - you know.

But back to this PlugIn - what do you think about the 78% - is this a depiction problem btw. a problem with calculation? Or do the PlugIns Restore realy don't work to 100% - and then in case of disaster the restore isn't usefully?
Title: Re: Backup: backup and restore the database
Post by: AlexL on August 02, 2007, 09:34:47 am
A new little confusion found - the files created from the PlugIn - I can't chmod this files with ftp - but i can delete this.
Is this a unix permission problem - because the files are php-created and the owner is the php-script?
Has my hoster to change anything on the server therefore?
Title: Re: Backup: backup and restore the database
Post by: Joachim Müller on August 02, 2007, 09:44:21 am
Not related to the plugin, but a matter of server setup (ownership!)
Title: Re: Backup: backup and restore the database
Post by: AlexL on August 02, 2007, 09:58:30 am
Ok - then I have think correct.
But what about the 78% - any Ideas
Title: Re: Backup: backup and restore the database
Post by: cyberboy on August 16, 2007, 06:22:52 am
great tool..

installed .. ;)

thx  :-*
Title: Re: Backup: backup and restore the database
Post by: twist on September 26, 2007, 04:13:28 pm
works like a charm on my gallery but i've a question:
there is a way to automate the backup process? i tried to launch a lynx process and pass the form variabiles but it doesnt work, since checks if the user logged in.
And i'm not skilled enough to perform changes into sources :/
maybe any1 done something similar?
Title: Re: Backup: backup and restore the database
Post by: AlexL on September 26, 2007, 04:33:45 pm
Maybe better to use the phpmyadmin or other tools to make this on serverside
Title: Re: Backup: backup and restore the database
Post by: twist on September 26, 2007, 04:39:51 pm
Maybe better to use the phpmyadmin or other tools to make this on serverside

Sure but i cant cronjob that work with phpmyadmin
And other free tools around doenst work on php safe_mode /
Title: Re: Backup: backup and restore the database
Post by: Joachim Müller on September 27, 2007, 08:13:58 am
phpMyAdmin is not an option for huge galleries, as it may time out. Additionally, making backups using other tools than this plugin is not the subject of this thread. Discussion about those other tools should not be lead here.
If you need a tool that will not time out and that can be set up to use cronjobs, then take a look at the free Tools recommended by the devs > mySqlDumper (http://forum.coppermine-gallery.net/index.php?topic=31423.msg145478#msg145478), but don't discuss it on this thread.
This plugin has not been made for users who have full control over their server (and that's the privilege level you need to run cronjobs): if you actually have the power to create cronjobs, you probably have shell access. You can easily come up with a script that takes advantages of the shell and use the mysqldump command available there.
Anyway, 99% of all users don't have the permission to do this and don't have the skills needed to come up with such a shell script. That's why this plugin has been created: you only need the skills needed to maintain coppermine in the first place to be able to use this plugin. It was designed for ease of use.

All discussions on alternative backup methods should be lead somewhere else (not in this thread).

Joachim
Title: Re: Backup: backup and restore the database
Post by: mentalist3d on October 25, 2007, 11:56:06 am
Hi

just installed your plug-in and it works a charm, I've tried other plug-ins sometimes with negative effects so I was a bit hesitant, however using PHPmyAdmin was a bit daunting and this plug-in was just what I needed for a quick backup worry free, thanks :-)

PS - Will coppermine add this as standard to their software as it was always an option that I felt was missing from the main package.

Thanks again :-)

art.concepts.org.uk (http://art.concepts.org.uk): register for free and begin displaying art with your free 100Mb of gallery space
Title: Re: Backup: backup and restore the database
Post by: Joachim Müller on October 27, 2007, 11:08:24 am
Will coppermine add this as standard to their software as it was always an option that I felt was missing from the main package.
This is currently being discussed on the dev-only board. My vote is "yes".
Title: Re: Backup: backup and restore the database
Post by: AlexL on October 27, 2007, 09:53:23 pm
My vote is yes too. But with the extension of a separate php site (password protected) for restore in worstcase, if db corrupted and admin page don't work.
Title: Re: Backup: backup and restore the database
Post by: Joachim Müller on October 28, 2007, 11:00:24 am
My vote is yes too.
Cpg1.5.x development should not be discussed further within this thread!

But with the extension of a separate php site (password protected) for restore in worstcase, if db corrupted and admin page don't work.
That's what I already have pointed out - see
Things that are left to do: backing up your database is important and can be achieved using this plugin. However, if the database is broken and needs to be restored from a backup, the coppermine user interface might be broken as well. Subsequently, newbies can't restore the database using the plugin (which requires the coppermine user interface to be up). That's why I plan to implement a standalone file for restoring the dump. I'm not sure though if this will go into the plugin (because I'm not sure how to accomplish this permissions-wise) nor when I will have the time to look into this, so don't expect such a file in the near future.
Title: Re: Backup: backup and restore the database
Post by: erostew on October 29, 2007, 06:13:32 pm
If you do decide to add an external page for emergency restore then it could be implemented exactly as the install.php for good security. Will need the user to submit mysql db name, user and pass. Maybe a good idea anyway, in case the config.inc.php is corrupted or something. If the user doesn't have the required mysql info then probably he should not be using the script in the first place.

You could also make it use the same lock file as the install.php. That way the user must have access to ftp or a control panel file manager to be able to run it. Even a complete newbie with no knowledge of his mysql info and unable to figure out how to comment out a die statement in the source can surely figure out how to delete a file.

Or you could combine the 2 together. Less newbie friendly but more secure.

For scheduling I seem to remember seeing a couple of pseudo cron classes that could be used. Not sure if that is a good idea or not though. If it was done it should probably be coded to allow no more than daily backups, to avoid over zealous users trying to backup their db every 5 minutes and crippling the server. (not that I ever crippled a server by scheduling a cron task at too small an interval so that all the memory on the server was eaten up by tasks that never had a chance to finish before the next one started.  :o )

A db backup should definitely be a part of any web app that uses mysql so heavily. I personally have remote access to MySQL so I can use the MySQL Administrator tool that has scheduling capabilities and doesn't have the limitations of phpmyadmin when it comes to filesizes. However the majority of users do not have that option. A very good idea to develop this.  ;D
Title: Re: Backup: backup and restore the database
Post by: Davide Renda on October 30, 2007, 09:59:17 am
Just been through this plug-in and realised the existing Italian translation were not adapted to the latest version 2.2, attached to this post reviewed Italian translation.
By the way, I'm using it on a Coppermine gallery with ModPack and works O.K.
Title: Re: Backup: backup and restore the database
Post by: just_some_guy on November 23, 2007, 11:48:52 pm
Hello,

I have been using this plugin for quite some time now, backing up the db as i go along and today came the time i needed to use it. Because i am changing mysql servers so i took a backup of the CPG tables and the SMF tables (its a bridge). I then i wanted to prepare the new server so i just needed to change the info in config.inc.php and it would work. I then went onto PHPMyAdmin and pasted the contents of the .sql file created by this plugin into the query section pf phpmyadmin. I then ran the query. But there are errors in the syntax, for example heres one -

Code: [Select]
INSERT INTO `smf_log_online`
VALUES (

'gga9hpcbmfus5ctfv15srum312', 2007 -11 -2322 :15 :49, 1, 1378420331, 'a:1:{s:10:\"USER_AGENT\";s:89:\"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)\";}'
);

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '22:15:49,1,1378420331,'a:1:{s:10:\"USER_AGENT\";s:89:\"Mozilla/4.0 (compatible; ' at line 1

How shall i go about creating the tables and the info on the new server now  :-\?

Thanks,

Title: Re: Backup: backup and restore the database
Post by: Nibbler on November 24, 2007, 12:03:10 am
http://forum.coppermine-gallery.net/index.php?topic=40439.msg216680#msg216680
Title: Re: Backup: backup and restore the database
Post by: just_some_guy on November 24, 2007, 10:46:07 am
Thanks, that fixed it.
Title: Re: Backup: backup and restore the database
Post by: PerformanceImagery on January 10, 2008, 10:36:08 am
Using v2.1 (as well as the plugin in the first post) I get this error...

ERROR !

No table selected. You have to select at least one table.

It was mentioned earlier in the thread, but nothing ever came of it.   My site is hosted on PowWeb and I've not ran into any restrictions with mySQLadmin (but I'm a newbie at it).  My Coppermine is bridged with Joomla and I'm thinking that is the source of the issue... as it is with most plugins in a bridged environment.  Just thought I'd report this.
Title: Re: Backup: backup and restore the database
Post by: disposition on January 18, 2008, 05:26:46 pm
Using v2.1 (as well as the plugin in the first post) I get this error...

ERROR !

No table selected. You have to select at least one table.

It was mentioned earlier in the thread, but nothing ever came of it.   My site is hosted on PowWeb and I've not ran into any restrictions with mySQLadmin (but I'm a newbie at it).  My Coppermine is bridged with Joomla and I'm thinking that is the source of the issue... as it is with most plugins in a bridged environment.  Just thought I'd report this.


I have the same issue, my gallery is bridged with phpbb and I get the same error.  Hopefully we will figure out why it gives this error.
Title: Re: Backup: backup and restore the database
Post by: Nibbler on January 18, 2008, 05:38:23 pm
You probably need to add $CONFIG['LINK_ID'] to all the mysql_* calls for bridge compatibility.
Title: Re: Backup: backup and restore the database
Post by: disposition on January 18, 2008, 08:24:24 pm
Ah, it is a bit over my head, at least at the moment.  I will look into it.  THANKS for your reply.
Title: Re: Backup: backup and restore the database
Post by: Joachim Müller on January 20, 2008, 12:43:00 pm
Rolled the contributed language file improvements into new package - attached is version 2.3 of the backup plugin
Title: Re: Backup: backup and restore the database
Post by: PerformanceImagery on January 28, 2008, 06:31:12 pm
You probably need to add $CONFIG['LINK_ID'] to all the mysql_* calls for bridge compatibility.

Nibbler, can you explain this a bit more please?
Title: Latest version in the first post
Post by: cgc0202 on January 30, 2008, 01:26:48 am
Hello,

I wonder what the latest version of this plugin is.  GauGau has this:   cpg1.4.x_plugin_backup_2.3.zip  in his latest post.  Is this the latest and is it the same as the one in the original post?  If possible, kindly include the latest in the first post, to avoid confusion. Thanks.

Cornelio
Title: Re: Backup: backup and restore the database
Post by: François Keller on January 30, 2008, 07:42:22 am
Hello,

I wonder what the latest version of this plugin is.  GauGau has this:   cpg1.4.x_plugin_backup_2.3.zip  in his latest post.  Is this the latest and is it the same as the one in the original post?  If possible, kindly include the latest in the first post, to avoid confusion. Thanks.

Cornelio
The latest version of this plugin is 2.3. You're right, i attach this version to the first post.
Title: Re: Backup: backup and restore the database
Post by: cgc0202 on January 30, 2008, 01:52:19 pm
The latest version of this plugin is 2.3. You're right, i attach this version to the first post.

Thanks Frantz. And, to avoid confusion, would it be possible to remove the old one? 

I have some important clarifications. 

Case A:
Sometimes when I outgrow a certain "site" (subdomain), I have to create a more dedicated site. And since I am in a shared server, usually the database name dhqnges look like these:


siteusername1_databasename1 => old

siteusername2_databasename1 => new site (different server)

or even like this:

siteusername1_databasename2 => new site (same server)

How are the two situations dealt with?

Case B:

There are some multimedia applications as extensions of Joomla that I wanted to use; but these new applications require storage of the images in other directories, obviously outside of CPG and in Joomla.  To use the applications therefore, I have to place the "original or some derivative images" in the designated directories in Joomla. I am considering redoing   my various CPG photogalleries so that they conform with the Joomla directories used by the applications.  Basically they are placed in the "images" root directory of Joomla, otherwise the programs will not recognize they images. 

This means placing the respective "albums directory" of the various CPGs outside of the CPG. This is doable, I have done this many times  before, using a centralized image repository, outside of CPG.  [Thanks through the help  and tips of several CPG core team members.]

Is there an eway to change the "directory" location of the images  without creating new CPG galleries again?  If not possible, and I had to create the various CPGs with new installs,


Thanks

Cornelio

Note:

Over the years, I have  tens of thousands of images in several dozens of CPGs -- occupying something like 30-50Gb. They are found in a number of independent shared hosting servers, in multiple domains and subdomains, so I never totaled the actual. My own external disks mostly of photos has used up about 200Gb but these include some of my own photos (the contents of the CPG sites include  photos mostly from Contributors). Several thousands of these images already with captions, and it is a lot of work and time to transfer these captions manually.

Eventually, I have to consolidate my various accounts from the various shared servers I am using now  into a dedicated server, so the aforementioned issues, I will encounter again, in the future.





Title: Re: Backup: backup and restore the database
Post by: IceQueen on October 14, 2008, 08:02:27 pm
I want to install the modpack by Stramm in my gallery, but it says that I first need to make a backup of my gallery, so I downloaded this and installed, but when I try to make a backup, it keeps me saying "error!" :S :S
Title: Re: Backup: backup and restore the database
Post by: Joachim Müller on October 15, 2008, 07:59:58 am
Since you failed to post relevant information (what error, link to your page etc.), your request is totally invalid, so you can't expect help.
Title: Re: Backup: backup and restore the database
Post by: AndrewRH on December 21, 2008, 01:06:30 am
Would it be possible for it to be extended so that it compresses the database, eg. zip?

~Andrew~
Title: Re: Backup: backup and restore the database
Post by: mikesreel on January 19, 2009, 06:38:42 am
THANK YOU THANK YOU THANK YOU!!

V2.3 works perectly...the first time around too :)
Title: TChinese_Big5 language tran done.
Post by: evildeepblue on January 19, 2009, 07:32:34 am
dear

Trad. Chinese (Big5) is tranlate done.  ;D

thanks your plug-in

Title: Re: Backup: backup and restore the database
Post by: michelon on January 31, 2010, 09:16:48 pm
this is a really nice plugin.

however, i have got some problems with the german umlauts when I try to restore a backup from one webspace (funpic) at another one (cwcity). I do this because funpic is not so steady as it should be.

Does anybody know such problems? i guess it has something to do with the chairset but i dont have a clue how to solve it. the target mysql database uses the utf-8 chairset. Is there anybody who can give me a hint? if you need some more informations tell me.

thanks michael
Title: Re: Backup: backup and restore the database
Post by: Joachim Müller on February 01, 2010, 07:16:26 am
Both databases (and subsequently both dumps) need to have the same collation. However, this plugin can't be used to restore dumps, so what you ask is beyond the scope of this thread. You shouldn't try to hijack it. Additionally, we have board rules that you agreed to respect. One of them says that you need to post a link to your gallery in each thread you post in no matter what. But then again, we can't really help you in converting your dumps and changing the collation of a database - I suggest asking your webhost for support (if it's a paid webhost who you actually can ask questions).
Title: Re: Backup: backup and restore the database
Post by: michelon on February 01, 2010, 09:37:42 pm
srry, i just thought of asking the persons who coded the plugin, because they should better know how it works than my web provider. And posting a link refering to my homepage would not solve the problem I guess. Anyway it is www.michelon.cwsurf.de?cat=4 the album "Südschweden".
Title: Re: Backup: backup and restore the database
Post by: Joachim Müller on February 02, 2010, 07:34:37 am
Clicking on that link returns a 404 not found, so no: posting an invalid, not working link indeed doesn't help. ::)
Title: Re: Backup: backup and restore the database
Post by: michelon on February 02, 2010, 10:02:16 am
Oops, sorry, my bad  ;D the correct link is http://michelon.cwsurf.de/index.php?cat=4
Title: Re: Backup: backup and restore the database
Post by: michelon on February 03, 2010, 01:42:14 pm
well, i solved the problem partially by importing the backup with the charset latin1. however, the links still arent displayed correct. Here ü is replaced by %FC for example.
the gallery is still available at http://michelon.cwsurf.de/index.php?cat=4
Title: Re: Backup: backup and restore the database
Post by: Joachim Müller on February 03, 2010, 10:19:35 pm
Can't replicate. Works fine for me.