[ZendTo] Migrating to new server

Jules Jules at Zend.To
Sun Apr 21 10:27:36 BST 2019


On 19/04/2019 8:08 pm, Kevin Miller via ZendTo wrote:
> Well, this turned out easier than I expected.
>
> I install sqlite3 on my old and new zendto servers. Then ran the following command:
>    sqlite3 zendto.sqlite .dump > zendto.sqlite.txt
>
> This gave me a text dump of the databases.  From there I was able to look at the schema on both servers. with:
>    cat zendto.sqlite.txt | grep -v INDEX | grep -v INSERT
>
> That pretty much cleaned out most of the cruft that was irrelevant.  Note I only had a dozen or so messages to worry about.  On a very active server you may have a bit more work to do to get to just the schema.  Or probably there's a sqlite command to just dump the schema.
Funnily enough, it's simply
     .schema
:-)

>
> Anyway, the schema was the same on both so I just copied the files/dirs in /var/zendto/drop-offs to the new serer, then copied the old database to the new one and restarted apache.
And if the schema isn't the same, the overnight cleanup cron job will 
fix the missing bits of the schema for you.
So if after moving everything over, it doesn't work, just leave it for 
the day and try again in the morning.

>
> Prior to copying all the files over, I created a test upload so I'd have an active dropoff to verify I could still get it on the new box.  After copying everything over, there was no problem going in and retrieving the dropoff that I'd originally made on the old server from the new server.
>
> The only thing that didn't seem to come over was the statistics when I tried to view them, but I can live with that.
Provided you copy of the rrd data file, you should be able to do this. I 
certainly have done. The location of the RRD file is near the top of 
preferences.php.

> Hope this helps someone down the line.  It was definitely worth the upgrade - nice new security and encryption features, etc.
The key step here is to *not* try to do an in-place upgrade. As you have 
demonstrated, build a new server, get it all working exactly how you 
want it, and only then migrate the existing drop-offs and database across.

Well done!

Cheers,
Jules.
>
> ...Kevin
> --
> Kevin Miller
> Network/email Administrator, CBJ MIS Dept.
> 155 South Seward Street
> Juneau, Alaska 99801
> Phone: (907) 586-0242, Fax: (907) 586-4588 Registered Linux User No: 307357
>
> -----Original Message-----
> From: ZendTo [mailto:zendto-bounces at zend.to] On Behalf Of Kevin Miller via ZendTo
> Sent: Wednesday, April 17, 2019 2:52 PM
> To: 'ZendTo Users'
> Cc: Kevin Miller
> Subject: [ZendTo] Migrating to new server
>
> Old server:
> 	Debian Jessie (8)
> 	Zendto 4.28
>
> New server:
> 	Debian Stretch (9)
> 	Zendto 5.17-6
>
> I built a brand new server and with a minimal amount of fuss was able to get it configured thanks to Jules' handy update scripts.  Now however I want to move the existing uploads to the new server from the old one.  I found some old messages in this list which said to copy ALL the directories under /var/zendto/drop-offs and /var/zendto/incoming.  Easy enough.  Also saw a post by Jules mentioning to stop the cron.d jobs so things don't get out of whack during cleanup.
>
> I don't know how to migrate the sql stuff however.  As nearly as I can tell, both servers are using SQLite.  Mysql does not exist on my new server (php7.3-mysql is installed however).  It is installed on the old server but not being used.  At least there aren't any tables with names like "zendto" or anything.
>
> If I had to hazard a guess I'd suppose that there may well have been schema changes from 4.28 to the current version, 5.17-6.
>
> So beyond moving the files over, what's the optimal way to get the database information moved?  Or is it even possible?
>
> Thanks.
>
> ...Kevin
> --
> Kevin Miller
> Network/email Administrator, CBJ MIS Dept.
> 155 South Seward Street
> Juneau, Alaska 99801
> Phone: (907) 586-0242, Fax: (907) 586-4588 Registered Linux User No: 307357
>
>
>
> _______________________________________________
> ZendTo mailing list
> ZendTo at zend.to
> http://jul.es/mailman/listinfo/zendto
>
> _______________________________________________
> ZendTo mailing list
> ZendTo at zend.to
> http://jul.es/mailman/listinfo/zendto

Jules

-- 
Julian Field MEng CEng CITP MBCS MIEEE MACM

'Making machines do what you want requires only two qualities:
  1) Being slightly more stubborn that the computer, &
  2) Remembering that computers are electrified rocks.' - @JediJeremy

www.Zend.To
Twitter: @JulesFM

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jul.es/pipermail/zendto/attachments/20190421/6321e2bc/attachment-0001.html>


More information about the ZendTo mailing list