[GTALUG] Selectively restoring WordPress posts from old SQL dump

ted leslie ted.leslie at gmail.com
Thu Mar 30 00:50:19 EDT 2017


What i have done,
reload backup to a new mysql/postgres db (assuming a binary quick load
backup)
(delete what you don't want - optional)
then export db using text insert ability (not a binary blob).[can't
remember args for mysql/postgres off top of my head, but they are there]
then run it as a script based import to DB (which takes longer, but....)
no copy and paste, just direct the insert script to the db.
You may have an issue if you attempt to over-write a key. (auto index key).
You may want to also state the db you are using, hey maybe its msSQL :)

-tl


On Wed, Mar 29, 2017 at 11:24 PM, William Witteman via talk <talk at gtalug.org
> wrote:

> I have a bunch of WordPress blogs sharing a database, which seemed
> like a good idea at the time.
>
> Now I have a bunch of posts that were overwritten at *some* time in
> the past by bad data, but my backups are good.
>
> My backup testing works perfectly well for complete replacement, but I
> don't want to do that - I want to cherry-pick for one blog of several,
> and only replace posts that existed in November with the same IDs in
> today's database, but leave everything else alone.
>
> Does anyone have any thoughts?
>
> Right now I am hoping not to have a couple of terminals open and try
> to manually run UPDATEs with copy-n-paste, because that seems rather
> error-prone.
>
> Thanks!
>
> William
> ---
> Talk Mailing List
> talk at gtalug.org
> https://gtalug.org/mailman/listinfo/talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gtalug.org/pipermail/talk/attachments/20170330/4be996c7/attachment.html>


More information about the talk mailing list