[SOLVED] Dropbox keys not updated after restore

Hi,
I have recently restored by database to a new installation (V6 to V7). However, after restore my dropbox backup fails due to wrong keys. I check the keys via my site and they are reported differently to those in my site-config.json.
I did a search and it seems like my old dropbox keys are somehow stored in my database backup file. My question is how can I remove and/or reset these so I can again start using dropbox backup.
Thanks,
Tony

@tony1 A simple solution would be doing something like this:

  • Checkout Database for your site where old database is restored. (Write down correct database name, and try finding dropbox table to find old keys in it (if you don’t know your old keys)
$ bench mysql
$ show tables;
# I don't exactly know what table do Dropbox use in standard database. So visually inspect it before running following:
$ select * from tabDropbox/whateverTableNameis;
  • Then go to root or auth yourself as root while running following command to export SQL file.
mysqldump -u root --no-create-info correctdatabasename > mydatabase.sql
  • Then you can just do a find and replace on myfile.sql and import back to
$ find /path/to/myfile.sql-file -type f -exec sed -i 's/oldkey/newkey/g' {} \;
# Replace "oldkey" with old dropbox key and put new dropbox key in "newkey" before you run the command.
  • Then at last, do import database back to MariaDB as follows:
$ mysql -p -u root correctdatabasename < mydatabase.sql

This topic was automatically closed after 3 days. New replies are no longer allowed.