{"id":3362,"date":"2022-08-05T12:09:06","date_gmt":"2022-08-05T11:09:06","guid":{"rendered":"https:\/\/kudzia.eu\/b\/?p=3362"},"modified":"2022-08-05T12:09:07","modified_gmt":"2022-08-05T11:09:07","slug":"best-practicals-rt-recovering-specific-tickets-from-backups","status":"publish","type":"post","link":"https:\/\/kudzia.eu\/b\/2022\/08\/best-practicals-rt-recovering-specific-tickets-from-backups\/","title":{"rendered":"Best Practical&#8217;s RT &#8211; recovering specific tickets from backups"},"content":{"rendered":"\n<p>I needed to recover a particular, old and already shredded, RT ticket from a backup to web interface. <\/p>\n\n\n\n<p>I&#8217;ve restored the database to a separate server and run those commands to get INSERT statements for two tickets i was interested in &#8211; 69187, 100112:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nmysqldump rt2019 -w &quot;Id in (69187,100112)&quot; --no-create-info --skip-extended-insert --hex-blob Tickets |grep INSERT &gt; recovery.sql\nmysqldump rt2019 -w &quot;ObjectId in (69187,100112) AND ObjectType=&#039;RT::Ticket&#039;&quot; --no-create-info --skip-extended-insert --hex-blob Transactions |grep INSERT  &gt;&gt; recovery.sql\nmysqldump rt2019 -w &quot;TransactionId in (SELECT id FROM Transactions WHERE ObjectId IN (69187,100112) AND ObjectType=&#039;RT::Ticket&#039;)&quot; --no-create-info --skip-extended-insert --skip-lock-tables --hex-blob Attachments |grep INSERT  &gt;&gt; recovery.sql\nmysqldump rt2019 -w &quot;ObjectId IN (69187,100112) AND ObjectType=&#039;RT::Ticket&#039;&quot; --no-create-info --skip-extended-insert --skip-lock-tables --hex-blob ObjectCustomFieldValues |grep INSERT &gt;&gt; recovery.sql\n<\/pre><\/div>\n\n\n<p><\/p>\n\n\n\n<p>To be on the safe side &#8211; always recover to a test instance of RT and not a live environment!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I needed to recover a particular, old and already shredded, RT ticket from a backup to web interface. I&#8217;ve restored the database to a separate server and run those commands to get INSERT statements for two tickets i was interested in &#8211; 69187, 100112: To be on the safe side &#8211; always recover to a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[51],"tags":[],"class_list":["post-3362","post","type-post","status-publish","format-standard","hentry","category-unimportant"],"_links":{"self":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/3362","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/comments?post=3362"}],"version-history":[{"count":1,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/3362\/revisions"}],"predecessor-version":[{"id":3363,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/3362\/revisions\/3363"}],"wp:attachment":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/media?parent=3362"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/categories?post=3362"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/tags?post=3362"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}