The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

files missing from database

Discussion in 'Database Discussions' started by triton1, Apr 16, 2012.

  1. triton1

    triton1 Member

    Joined:
    Apr 15, 2012
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I'm running a cloud Linux with vm with whm/cpanel, On last tuesday when I went to log in to whm the password was changed and passwords was changed in 2 cpanels i'm only hosting 2 sites at this time, also the limit on the size of upload for rar and zip files changed, and both sites lost a lot of rar and zip files also the users of the database changed, I had a test database on each site and the users from them swapped to the other databases, no one has access to whm but me and I handle the cpanels for both sites logs also show i was the only one in them, can anyone tell me how to get the lost rar and zip files back and also how to fix the users in the database and how this could have happened of course the host co said that it can't happen but it did, and there solution is to restore from an old back up and then i lose a weeks full of posts files and new members, i'm kind of at my wits end and any help will be appreciated whm is 11.32.2 and they migrated the the sites to the new server in the beginning of april vbulliten on both sites
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,469
    Likes Received:
    197
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    That's a lot to have happen.

    Who did? Assuming your Hosting Provider. That backup from the beginning of April might indeed be useful in helping get back any rar and zip files you're missing. If yes that gets most of your files back.

    You can change passwords again in WHM and the cPanel accounts of course, and even reset the usernames and passwords for the databases that you mention.

    You can also change the upload limits as needed.

    None of that requires you to lose any posts in your forum, although you might not be able to restore all missing attachments so would have to remove links to them on your forum I would think. That is, unless the database of the forum has issues as well. If so, then your Hosting Provider is correct in that the only hope of recovery is that backup.

    Still, these items you mention that happened unexpectedly seem a bit strange to me. If someone was trying to hack your accounts and forums, this isn't what they might do I don't think. And, if someone other than you, or your host got into your server with root user's password and changed said password and other accounts passwords, restoring that backup is the only way to go. I'd be moving my accounts to a new server if I was you. If someone has your servers root password to do any of this, that server has been compromised and should no longer be considered safe. IMHO.
     
  3. stdout

    stdout Well-Known Member

    Joined:
    Apr 10, 2003
    Messages:
    189
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    Nelspruit, Mpumalanga, South Africa
    cPanel Access Level:
    Root Administrator
    You could easily reinstate the mySQL Users by simply extracting mysql.sql from the backups and re-importing it.
    ie. "mysql mysql < mysql.sql"

    As for retreiving the lost files - there is no specific directory where "lost" files go and hide.
    You'll need to further investigate how lost RAR and ZIP files had gone missing.

    Your subject mentions lost files in mySQL database - if you're refering to the actual mySQL Database and you've already attempted a repair, try a "myisamchk -r /var/lib/mysql/database_name/*.MYI" to see if mySQL is able to recover/rebuild the missing files.
     
  4. triton1

    triton1 Member

    Joined:
    Apr 15, 2012
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator

    I have since changed passwords for whm and cpanels as and have read how to get the users back for the sql and will do that shortly, and have strengthened security now if I import the original sql from a back up will it over wright the and reinstall the missing rars and zips and I will not lose any new files posts and rars and zips and new members?
     
  5. triton1

    triton1 Member

    Joined:
    Apr 15, 2012
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    i have tried the repair database and the zips and rars are not there but the posts are, I will try the command prompt you suggested to see what happens, but to be honest i'm not that good with command prompts so it will take me a bit to get it right before i feel i am able to execute the command prompt
     
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,469
    Likes Received:
    197
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    If it was me, I'm not sure I would import the backup database. But yes, if you import the database backup, it will wipe all data and replace it with the data in the backup sql. You will lose everything in the database currently in use.

    Sounds like you're storing attachments in the database. You might do better to have them in the file system. (a setting in vBulletin) At the very least, your database will be smaller if you did and easier to manage.

    If your host is unable to assist you with this sort of thing, they should, and you're uncomfortable with trying to clean this up on your own, you might want to hire a professional to help out.

    Sys Admin Services - cPanel Application Catalog
     
  7. stdout

    stdout Well-Known Member

    Joined:
    Apr 10, 2003
    Messages:
    189
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    Nelspruit, Mpumalanga, South Africa
    cPanel Access Level:
    Root Administrator
    I just want to clarify that my suggestion was to not restore/overwrite mySQL database from backups but to rather re-import only the "mysql.sql" export that contains the mySQL Grants.
     
  8. triton1

    triton1 Member

    Joined:
    Apr 15, 2012
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator

    yes That I understood, just need your opinion on this method what if i used impex to import the old database to the new then went threw the task of deleting the duplicate posts. and also how would i find the command prompt is that in Apache?
     
  9. stdout

    stdout Well-Known Member

    Joined:
    Apr 10, 2003
    Messages:
    189
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    Nelspruit, Mpumalanga, South Africa
    cPanel Access Level:
    Root Administrator
    1. Do yourself a favour and Backup /var/lib/mysql
    * Simply "cp -rpf /var/lib/mysql /var/lib/mysql.backup"

    The mysqlimport tool has an option to replace or ignore rows if duplicate key is found.
    If you aren't comfortable with CLI -- use phpMyAdmin in WHM as "root".
    * You are able to import your backup mySQL databases without overwriting existing records as well as to avoid inserting entries with duplicate keys.
     
  10. triton1

    triton1 Member

    Joined:
    Apr 15, 2012
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    thank You Dylan
    will this one -r, --replace If duplicate unique key was found, replace old row. replace the row in the sql that is active now in the forum ie add the missing attachment in the current sql?
     
  11. stdout

    stdout Well-Known Member

    Joined:
    Apr 10, 2003
    Messages:
    189
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    Nelspruit, Mpumalanga, South Africa
    cPanel Access Level:
    Root Administrator
    stick with -i instead
     
  12. triton1

    triton1 Member

    Joined:
    Apr 15, 2012
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thank you Dylan it worked great
     
Loading...

Share This Page