CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • How can I identify recent contacts sent to trash so that I can can restore them?
Pages: [1]

Author Topic: How can I identify recent contacts sent to trash so that I can can restore them?  (Read 649 times)

LindseyM

  • I post frequently
  • ***
  • Posts: 229
  • Karma: 8
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3.6
How can I identify recent contacts sent to trash so that I can can restore them?
April 01, 2015, 04:28:09 am
This morning I mistakenly deleted several hundred contacts. Fortunately they were not deleted permanently so they are still in the Civi trash folder. I'd like if possible to select trash and restore only the contacts I deleted. The easiest way would be to have the trash contacts in order of date placed there so I know who to restore. I can't see a way to do that from the front end. Is it possible to do that from the back end?

I realise I can re-set the database to our last backup yesterday but would like to avoid that if possible due to other work which would then be lost.

Any ideas on how to identify just the recently deleted records (preferably from the user interface) so that I can then restore them would be very gratefully received. Thank you. 
« Last Edit: April 01, 2015, 04:48:26 am by LindseyM »

clarkac

  • Administrator
  • Ask me questions
  • *****
  • Posts: 399
  • Karma: 11
  • CiviCRM version: 4.4.11 & 4.5.5
  • CMS version: Drupal 7
  • MySQL version: 5.1.61-cll
  • PHP version: 5.3.27
Re: How can I identify recent contacts sent to trash so that I can can restore them?
April 01, 2015, 05:12:33 am
Hi Lindsey

I think it's as simple as:  Advanced Search, check 'search in trash', don't use any other search criteria and hit 'Search'.  You'll then get every contact that's in the trash.  I just did this in 4.4 and 4.5.

Andy
Andy Clark

LindseyM

  • I post frequently
  • ***
  • Posts: 229
  • Karma: 8
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3.6
Re: How can I identify recent contacts sent to trash so that I can can restore them?
April 01, 2015, 05:56:34 am
Thanks Andy - I know how to search them but we have over 4000 contacts in trash and I only want to restore the ones which I deleted this morning. I somehow need to identify which ones those are which is why I was wondering if there's a way to sort the contacts in trash to show which were most recently deleted.

clarkac

  • Administrator
  • Ask me questions
  • *****
  • Posts: 399
  • Karma: 11
  • CiviCRM version: 4.4.11 & 4.5.5
  • CMS version: Drupal 7
  • MySQL version: 5.1.61-cll
  • PHP version: 5.3.27
Re: How can I identify recent contacts sent to trash so that I can can restore them?
April 01, 2015, 06:14:23 am
It's always trickier than you think... I tried using the 'Change Log' search on a contact I deleted today but it didn't work.  Not sure you can do this in the UI.  PHPmyAdmin here you come....?
Andy Clark

LindseyM

  • I post frequently
  • ***
  • Posts: 229
  • Karma: 8
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3.6
Re: How can I identify recent contacts sent to trash so that I can can restore them?
April 01, 2015, 10:34:59 am
Thanks. Circle Interactive suggested the following:

- In Advanced Search select "search in trash" > Search on "individual"
- In the "change log" tab tick "modified" and pick "This Day" from the date range

That certainly seems to have narrowed the list down. I'm not sure if it's entirely accurate but it's better than re-setting to a previous backup so I'll do some checks on the results and hope for the best!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • How can I identify recent contacts sent to trash so that I can can restore them?

This forum was archived on 2017-11-26.