Not the answer you need?
Register and ask your own question!

pt-archiver not using --columns specified

isheedmisheedm EntrantInactive User Role Beginner
I have a table with large blobs in it that I'm trying to move to a new server. I want to move all the records without the blobs first, then I'll run pt-table-sync later to update the blobs. I used the --columns option in pt-archiver to specify every column except the blob one I want to ignore. However, pt-archiver picked 3 of the columns and didn't use the other ones I specified.

The command I'm using is:

pt-archiver --progress 1000 --columns=id,document_id,loadDate,fullName,fileName,fileExtension,type,loadUser,sizeMB --database=db --source ... --dest ... --no-delete --why-quit --txn-size 500 --where "1=1"

The dry-run shows:

INSERT INTO `db`.`attachments`(`id`,`document_id`,`type`) VALUES (?,?,?)

Why did it only pick these 3 columns? I told it all the columns I wanted...

Comments

  • MuneerMuneer Entrant Current User Role Beginner
    Even I am facing same problem, I think it's because of column names, it has caps in between the words (fullName) may be pt-archvier doesn't support it, not sure how to ignore it .
  • carlos.salguerocarlos.salguero Percona Toolkit Developer Percona Staff Role
    Could you share the output of
    SHOW CREATE TABLE
    
    ...?
  • carlos.salguerocarlos.salguero Percona Toolkit Developer Percona Staff Role
    Hi again,

    Internally, pt-table-sync is converting all field names to lowercase.
    Use:
    --columns action,minlat,minlon,ipaddr
    

    Regards
  • MuneerMuneer Entrant Current User Role Beginner
    Hi,

    I have specified field names in lower case it worked.

    Thanks
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.