[ZendTo] Migrating to new server

Kevin Miller kevin.miller at juneau.org
Fri Apr 19 20:08:25 BST 2019


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.

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.

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.

Hope this helps someone down the line.  It was definitely worth the upgrade - nice new security and encryption features, etc.

...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



More information about the ZendTo mailing list