Problems, need help? Have a tip or advice? Post it here.
7 posts Page 1 of 1
I was adding a repeatable textarea field and I duplicate-named it, wiping the content of the original field. I want to recover the field content and I can download any table from an SQL backup but I have NO idea where the data will be.

What I am looking for is the text contents of a textarea field in a repeating region called subSec3Content in the setup below:

Code: Select all
           <cms:editable type='group' name='sec3' label='Section 3' desc='Add as many as needed and select six to show' order='5'/>
            <cms:editable type='text' name='sec3Title' label='Title' group='sec3' order='1'/>
            <cms:editable type='text' name='sec3MenuTitle' label='Menu Title' group='sec3' order='2'/>
            <cms:repeatable name='sec3Content' label='Section 3 Content' group="sec3" order='3'>
                <cms:editable type='image' name='subSec3Image' label='Image' width='300' show_preview='1' preview_width='120'/>
                <cms:editable type='textarea' col_width='100px' name='subSec3Video' label='video'/>
              <cms:editable type='textarea' name='subSec3Content' label='content'/>
                <cms:editable opt_values='Show' type='checkbox' col_width='30px' name='subSec3Show' label='Show'/>
            </cms:repeatable>


Where should I look?

I'm not trying to restore the database - just recover the content.

Thanks!
Graham
Hi,

Duplicate naming a field shouldn't cause a data loss unless you go ahead and save the pages.

Anyway, since you do have a backup and are sure that it contains the lost data, I think you should simply restore the backup and that would bring you back to the state where you had not renamed the field.
Thanks KK. There have been a lot of changes to the code/database since the mistake - I know..... anyway, will the following plan work?

1. Backup the current database
2. Restore an older version with the missing content
3. Launch the site and (hopefully) recover the lost content directly from the site
4. Restore the current database
5. Replace the missing text from the copied data

The site is hosted but not live.
Graham
Yes Graham, I think that should work.
Do make sure to take a backup of the current state.
What kind of backup do you have? If it's install-ex.php, then it's fine. I would make a copy installation with the same database credentials, but different prefix set in config.php. Then, use some direct db-tool like HeidiSQL (much more friendly than phpmyadmin), to make another easy backup with .sql file and search for the differences. Anyway this is not a simple job and is a perfect way to learn some SQL :D

If the lost data is not hundreds of records, I would NOT bother with SQL, but simply retype it again. :lol: Faster than learning or improving recovery skills and also fail-proof. By 'retype' I also mean copy-paste from another installation.
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
Thanks Trendoman,
The backup is a compressed sql file: 203879f8613db4779038b3daa1e6d447.sql.gz

It is client entered data and there is no other source. We are changing our procedures.....

But I can do a direct restore on the host (GoDaddy) and grab the text as per the process above.

By the way, the 'show' selectbox approach to filtering repeating sections works great (apart from the implementation snafu...)
Graham
Thanks guys!
That was 'exciting' but it worked fine. I:

    Checked that I had a backup of the current site
    Restored the database from two days ago
    Restored the page php file from the same backup
    Loaded the page with all the missing info
    Saved a local copy
    Restored the latest database and php file
    Cut and pasted the missing data from the local copy into the control panel
    All worked OK


The GoDaddy daily backup of both the site and the database is very easy to use and their tech support is awesome. Highly recommended.
Graham
7 posts Page 1 of 1