Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: 1 [2]   Go Down

Author Topic: [help wanted]:MySQL backup system  (Read 29806 times)

0 Members and 1 Guest are viewing this topic.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
[help wanted]:MySQL backup system
« Reply #20 on: January 14, 2004, 12:06:46 am »

would be great - better than what we have now (nothing except smart-ass geek instructions on how to use phpMyAdmin's backup/dump). If you could come up with a solution that will work for newbies I'd appreciate it a lot (remember that half of it will be a newbie-proof documentation on how to use such a tool).

I'm looking forward to your contribution.

GauGau
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
[help wanted]:MySQL backup system
« Reply #21 on: January 14, 2004, 12:13:01 am »

:lol: There's no such thing as 'newbie proof'.
 Just look at half the questions you get here, would not be asked if the newbies had read the docs, and that includes me when I first came here. :oops:  :wink:
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
[help wanted]:MySQL backup system
« Reply #22 on: January 14, 2004, 12:23:37 am »

yeah, I (sadly) have to agree - but a good documentation will keep the other half from asking :wink: (hopefully)...

GauGau
Logged

jason

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Posts: 78
[help wanted]:MySQL backup system
« Reply #23 on: January 14, 2004, 02:27:31 am »

Quote from: "gaugau"
I'm looking forward to your contribution.


ok, keep squinting....i'll post back when im ready for some outside testing.
Logged
jason

mikis

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
    • http://mikis.org
[help wanted]:MySQL backup system
« Reply #24 on: January 16, 2004, 12:43:03 am »

Maybe this can be used as a start... I picked it up on a forum some time ago. It is a simple script for restoring MySQL dump files. Restore (dump) file should be in the same dir as the script, or you can change its name and path; you can for example upload dump files with FTP.

Code: [Select]

<?
/* change this to fit your configuration: */
$hostname = "localhost";
$username = "myusername";
$password = "mypassword";
$dbname   = "mydbname";
$filename = "mydbname_db.sql";

/* Code begins here */

$connect = mysql_pconnect($hostname, $username, $password) or die(mysql_error());

echo "Import Started...<br>\n";
$handle = fopen ($filename, "rb");
$contents = fread ($handle, filesize ($filename));
$contents .= "\n\n";
fclose ($handle);
mysql_select_db($dbname);
$queries = explode(";\r\n", $contents); // if dump file is in Unix format, change ";\r\n" to ";\n"
$querycount = count($queries)-1;
for($i=0; $i < $querycount; $i++) {
    $result = mysql_query($queries[$i]);
    if(mysql_errno() != 0)
        echo '<br>' . mysql_errno() . ": " . mysql_error(). "\n";
}
echo "Import finished!<br>\n";
?>


From here, you can easily add file uploading via browser, or something like that. Creating dump file is much harder though. I tried using code form phpMyAdmin, but got lost in the way :)
Logged

Einstein

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 29
  • E = mc^2
« Last Edit: April 28, 2004, 07:24:44 pm by Einstein »
Logged

loboclerk

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: [help wanted]:MySQL backup system
« Reply #26 on: November 08, 2004, 08:42:36 am »

I used to code my own forum. And have implemented the backup this way:

1) Use mysqldump and zip with the date appended to the file name. Backup includes table structures and data.

2) Option of download or storage of the zip file into a specific backup folder.

3) User can manage (download, delete) all the stored zip files. Deletion is done for older archives to save space.

4) To restore database, just choose the zip file identified by date, or upload the zip file.

I chose zip as it compresses text files very well. Saving the zip file to a backup folder is helpful especially if HTTP/PHP timeout occurs when backing up large databases. For those limited by host space, they would choose the normal download and upload method to backup and restore respectively.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: [help wanted]:MySQL backup system
« Reply #27 on: November 08, 2004, 09:58:59 am »

Sounds promising. Do you have a script ready that accomplishes this?

Joachim
Logged

loboclerk

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: [help wanted]:MySQL backup system
« Reply #28 on: November 10, 2004, 07:39:17 am »

Lost my scripts long ago when I moved to phpBB. :P

Perhaps could code it again, should not be a big problem.

Will keep you updated :)
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: [help wanted]:MySQL backup system
« Reply #29 on: March 06, 2005, 10:04:24 pm »

This project looks like a possibility for some to use, makes no mention of the specific license it is released as.

http://www.absoft-my.com/pondok/backup.php
Logged

wildwalker

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: [help wanted]:MySQL backup system
« Reply #30 on: April 04, 2005, 11:02:42 pm »

This idea is really great.

Like everyone else on this forum, I would like to be able to backup my databases. However, I would like to be able to backup directly to my backup web server, so if one server is down, the other is still running (although I would not allow uploads on the backup server)

A backup system on the next version of coppermine would be really really handy though.
Logged

havoc615

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 24
    • Cheat Commandos Clan Site
Re: [help wanted]:MySQL backup system
« Reply #31 on: June 14, 2005, 02:43:14 am »

I can do a little php coding, so if u guys needa ny help lemmie know
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: [help wanted]:MySQL backup system
« Reply #32 on: June 27, 2005, 03:44:57 pm »

I'm using http://www.mysqldumper.de/en/index.php

from the webpage:
multilingual
Backup and restore of MySQL-Databases
Automatic sending of backups via Email or FTP
Automatic deleting of backups on the server following your own rules
Using a Perlscript as a Cronjob
Administration and manipulation of databases
Backup of database-structures (without data)
Backup and restore of tables
establishing of .htaccess to protect your backups
many details about your PHP-Version, MySQL-Version and more are shown
easy installation
easy handling
Multipart-Backup for very big databases
Multidatabase-Backup!
 

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9094
  • aka Frantz
    • Ma galerie
Re: [help wanted]:MySQL backup system
« Reply #33 on: January 21, 2007, 03:18:13 pm »

Hi all,

I have adapted a backup script to make a coppermine plugin.
see mi post here: http://forum.coppermine-gallery.net/index.php?topic=40439.0
Logged
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog
Pages: 1 [2]   Go Up
 

Page created in 0.035 seconds with 20 queries.