Author Topic: Feature Request: Copy Backup to other forum  (Read 15117 times)

Snaky

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Feature Request: Copy Backup to other forum
« on: October 19, 2010, 07:25:56 pm »
well, somehow tightly connected to the restore feature - make a backup not to local filesystem, but to another forum.

Thanks for your attention!

viulian

  • Administrator
  • Newbie
  • *****
  • Posts: 38
  • Karma: +1/-0
    • View Profile
Re: Feature Request: Copy Backup to other forum
« Reply #1 on: October 19, 2010, 07:51:32 pm »
Can you please describe more what you have in mind ?

Snaky

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Feature Request: Copy Backup to other forum
« Reply #2 on: October 20, 2010, 03:54:37 pm »
my use case: I have a development server, where I keep copies of several forums in different states (mods, themes, etc.).
Of course I use rsync and mysqldump for automated backup, but sometimes it is good to replicate one forum state to one instance of a development forum - e.g. to sync new boards with new IDs and new users etc.

full blown version the should have options like "sync new boards only", "sync new posts since", "sync new users only"... but I know that this would be a quite elaborate effort...

another use case: make a fast copy to anoher server for maintainance or as a backup system.

I understand, that there is no API for restore backup in smf - it should be a simple php file to do the job - however, the java interface could provide a good interface for organizing backups / servers / time.

To make it even better, you could use mercurial or git as a backend...

well, ok, just some dreams :)

Thanks for your attention!
Snaky
« Last Edit: October 20, 2010, 03:57:24 pm by Snaky »

viulian

  • Administrator
  • Newbie
  • *****
  • Posts: 38
  • Karma: +1/-0
    • View Profile
Re: Feature Request: Copy Backup to other forum
« Reply #3 on: October 21, 2010, 11:04:50 pm »
Hehe :)

Sync new posts since, etc ... reminds me of the 'cut off' date of Domino servers (back in the days when I worked with the Domino databases). If I remember correctly, it was related to when the replication last happened, so you could only replicate was was newer from the cut off date.

I am sorry but it would require too much time on my part ... unfortunately in MySql also - I don't think you have support for real-time replication, last modified date, cut off dates, etc, to help you, everything you have to implement either by hand, or ... you have to apply only the diff (between the two SQLs);
But then ... you might have conflicts - what if a board was renamed in 'production' server ? If you don't have the date of last modification - and you don't have it without modifying SMF, you have to handle each conflict manually ... do you keep the local version, the remote version, what do you keep from local ? If you keep only what is identical with 'production', then why not removing everything then reimporting ?

So as you say :) it's not a complex situation to understand what is needed, but that would be too much ...

I think, at least for themes, it might be easier to modify SMF not to show some themes to the users, so you could just do an 'update' in 'production' server and see them as admin - without fearing that users might select the theme.
One thing I did was a perl script that takes a 'production' databse - replaces all URLs with the localhost address of the forum (so then I don't spend time to reset all theme URL and paths) and imports it into Mysql. It took some of the pain away ..
« Last Edit: October 21, 2010, 11:06:23 pm by viulian »