Article ID: 124188, created on Jan 14, 2015, last review on Jan 14, 2015

  • Applies to:
  • Plesk Automation


When running

# ppa-transfer generate-migration list config.ini

it fails with the following error message

[ERROR]  | Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/parallels/common/cli/", line 34, in run
    options.method(migrator, options)
  File "/usr/lib/python2.7/site-packages/parallels/common/cli/", line 108, in <lambda>
    lambda m, o: m.generate_migration_list(o),
  File "/usr/lib/python2.7/site-packages/parallels/plesks_migrator/", line 2038, in generate_migration_list
    subscription_names += [ for s in backup.iter_all_subscriptions() ]
  File "/usr/lib/python2.7/site-packages/parallels/common/plesk_backup/", line 131, in iter_all_subscriptions
    for subscription, _, _ in self.iter_all_subscriptions_with_owner_and_reseller():
  File "/usr/lib/python2.7/site-packages/parallels/common/plesk_backup/", line 114, in iter_all_subscriptions_with_owner_and_reseller
    for client in self.iter_clients():
  File "/usr/lib/python2.7/site-packages/parallels/common/plesk_backup/", line 453, in iter_clients
    yield self.get_client(client_name)
  File "/usr/lib/python2.7/site-packages/parallels/common/plesk_backup/", line 461, in get_client
    auxiliary_users, auxiliary_roles = self._get_auxiliary_users_and_roles(info)
  File "/usr/lib/python2.7/site-packages/parallels/common/plesk_backup/", line 480, in _get_auxiliary_users_and_roles
    return cls._get_auxiliary_users(client_info), cls._get_auxiliary_user_roles(client_info)
  File "/usr/lib/python2.7/site-packages/parallels/common/plesk_backup/", line 484, in _get_auxiliary_users
    return list(cls._parse_users_node(client_info.find('users'), "client '%s'" % client_info.attrib['name']))
  File "/usr/lib/python2.7/site-packages/parallels/common/plesk_backup/", line 514, in _parse_users_node
    password = read_password(password_node)
  File "/usr/lib/python2.7/site-packages/parallels/common/plesk_backup/", line 93, in read_password
    return Password('plain', base64.b64decode(password_node.text))
  File "/usr/lib/python2.7/", line 76, in b64decode
    raise TypeError(msg)
TypeError: Incorrect padding
[ERROR]  | Unexpected error: 'Incorrect padding', migration is aborted. See the traceback above for more information.


Source database inconsistency in the "accounts" table is possible.

Password stored as base64 encoded strings must match requirement of format.

Base 64 works by encoding every 3 bytes into 4 bytes. When decoding, it takes those 4 bytes and converts them back to 3 bytes. If there were less than 3 bytes remaining in the input, the output is still padded with '=' to make 4 bytes. If the input to b64decode is not a multiple of 4 bytes you will get the exception.


  1. on the node where ppa-transfer was run find backup file, for example it is ""

  2. # unzip ./

  3. # cd clients

  4. # grep -ri '<password type="plain" encoding="base64">' ./* | awk -F '<|>' '{ if (length($3)%4>0) print $3; }'

  5. find located incorrect password in appropriate xml file and add required number of '=' signs at the end

  6. cd ..

  7. # zip -rf ./ .discovered clients domains backup_info_whatever.xml

  8. re-run ppa-transfer

e0aff7830fa22f92062ee4db78133079 caea8340e2d186a540518d08602aa065

Email subscription for changes to this article
Save as PDF