Working on a sync script for large existing data
-
Greetings bstump,
So I’ve resolved to use this plugin as it’s the best thing I’ve found and thank you for sharing this code. I’m working on moving an existing wordpress site to new hosting and using rackspace cloud files for the media.
One issue I’m struggling with is that I have approx. 438,276 files totaling 31.52 GB. Initially, when enabling this plugin, it basically crashed my server as those local file arrays got way too large! I was able to use turbolift to upload the files to my CDN (which took forever as I recall.) I cannot remember if the plugin ended up syncing with the existing files or if I ramped up the PHP memory limit and timeout until I got it done. I did have it working at one point though.
Now that I’ve settled on my configuration for the new hosting, I need to cut-over the current site to the new hosting. It requires a database dump and an rsync push (I stashed images that would have been deleted by the plugin and used them to compare against for the subsequent mirror push.) However, it’s been several weeks and this website produces huge amounts of media (news website.) Now, when enabling the plugin after a recent mysql dump and rsync push, I get the super lag and timeout again. It’s just too much of pain in the you-know-what.
Once the website has been moved to the new hosting, this plugin will work perfectly.
That being said, I have been working on a PHP script today for the purpose of doing the heavy lifting from command line. Essentially, my goal is to make this a companion script for your plugin that works like turbolift but uses PHP (might be a little easier for the average Web developer. Also, I don’t really want to upload the extra images to the new hosting server, so I plan on making this as easy as pointing to a directory on the current server or a stash of new files since the last sync on my computer.
I haven’t really jumped into your plugin code to see how your updating metadata about images in the cdn yet. I’m scratching the surface here. But I’d appreciate any critiques/suggestions/alternate solutions you may have. Feel free to fork and send me pull requests if you desire (ie. feel free to contribute or take over with your greater experience with opencloud.) Or let me know if I can accomplish this without resorting to scratching my own itch.
Thanks again.
- The topic ‘Working on a sync script for large existing data’ is closed to new replies.