2015-06-12 10:47:55,525 ERROR [main] c.a.s.i.backup.client.RestoreMain stash-20150610-050538-924.tar could not be restored. Reason: This version of the restore client (1.4.0) lacks the necessary features to restore the backup stash-20150610-050538-924.tar of Stash 3.8.0. You must upgrade the restore client to successfully restore the backup.
2. So I downloaded, installed and configured your latest version 1.9.1 backup client on the new environment, but now I'm getting this error:
2015-06-12 13:06:53,351 INFO [main] c.a.s.i.b.client.spring.SpringMain Initializing 2015-06-12 13:06:54,601 INFO [main] c.a.s.i.b.c.DefaultRestoreClient Unpacking stash-20150610-050538-924.tar to /home/stash/stash_home 2015-06-12 13:07:48,342 INFO [main] c.a.s.i.b.c.DefaultRestoreClient Validating database before restore 2015-06-12 13:07:49,009 ERROR [main] c.a.s.i.backup.client.RestoreMain stash-20150610-050538-924.tar could not be restored. Reason: The target database is not configured for UTF-8 support. For information about creating a database for use with Stash, please refer to the Stash documentation. com.atlassian.stash.internal.backup.client.RestoreException: The target database is not configured for UTF-8 support. For information about creating a database for use with Stash, please refer to the Stash documentation. at com.atlassian.stash.internal.backup.client.DefaultRestoreClient.validateDataSource(DefaultRestoreClient.groovy:261) ~[stash-restore-client.jar:1.9.1] at com.atlassian.stash.internal.backup.client.DefaultRestoreClient.withDataSource(DefaultRestoreClient.groovy:268) ~[stash-restore-client.jar:1.9.1] at com.atlassian.stash.internal.backup.client.DefaultRestoreClient.restoreDatabase(DefaultRestoreClient.groovy:220) ~[stash-restore-client.jar:1.9.1] at com.atlassian.stash.internal.backup.client.DefaultRestoreClient.restoreSystem(DefaultRestoreClient.groovy:254) ~[stash-restore-client.jar:1.9.1] at com.atlassian.stash.internal.backup.client.DefaultRestoreClient.restore(DefaultRestoreClient.groovy:85) ~[stash-restore-client.jar:1.9.1] at com.atlassian.stash.internal.backup.client.spring.SpringMain.run(SpringMain.groovy:28) [stash-backup-core-1.9.1.jar:na] at com.atlassian.stash.internal.backup.client.RestoreMain.main(RestoreMain.groovy:55) [stash-restore-client.jar:1.9.1] at com.atlassian.stash.internal.backup.client.JavaVersionCheckingShim.invokeClientClassMain(JavaVersionCheckingShim.java:71) [stash-restore-client.jar:1.9.1] at com.atlassian.stash.internal.backup.client.JavaVersionCheckingShim.run(JavaVersionCheckingShim.java:85) [stash-restore-client.jar:1.9.1] ... 69 frames suppressed
3. By the way I've dumped and recreated by stash database several times, the same I always do:
mysql> drop database stash; Query OK, 0 rows affected (0.00 sec) mysql> create database stash CHARACTER SET utf8 COLLATE utf8_bin; Query OK, 1 row affected (0.00 sec) mysql> flush privileges; Query OK, 0 rows affected (0.01 sec) mysql> grant all privileges on stash.* to 'stash'@'10.1.119.13' identified by '<passwd>'; Query OK, 0 rows affected (0.00 sec) mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) mysql> quit
4. These are the configuration settings within my backup-config.properties file:
stash.home=/mnt/external/stash_home stash.user=stash stash.password=<passwd for the stash user with admin privs> stash.baseURL=https://stashstag.vidder.net
jdbc.override=true jdbc.driver=com.mysql.jdbc.Driver jdbc.url=jdbc:mysql://<ipaddress>:3306 jdbc.user=stash jdbc.password=<passwd for stash database user>
Any help would be appreciated.
In regards to your questions:
That's expected. I just ran a test backup of a 3.8.1 release, and we do warn our customers about this situation (backup will work but restore won't – please read carefully the WARN message below):
$ java -jar stash-backup-client.jar 2015-06-15 11:26:59,949 INFO Initializing 2015-06-15 11:27:01,366 INFO Using Stash 3.8.1 2015-06-15 11:27:01,490 INFO Contacting Stash 2015-06-15 11:27:01,515 WARN The current version of the restore client (1.4.0) lacks the necessary features to restore backups for Stash 3.8.1. Backups will be performed successfully, but you must upgrade the restore client in order to restore them. To fail in this situation, please change the backup.requirerestorable property in backup-config.properties 2015-06-15 11:27:01,681 INFO Stash has been locked for maintenance. It may be unlocked with token: 63609bd8c8c052eab1e13f24654104b33347c2dc 2015-06-15 11:27:01,852 INFO Starting database backup on Stash. It may be cancelled with token: 62b55b32a8323fd39075975dd9b65dd80c13b4a2 2015-06-15 11:27:06,482 INFO (50%) Verifying Stash home 2015-06-15 11:27:06,504 INFO (50%) Verifying Stash home 2015-06-15 11:27:06,551 INFO (50%) Backing up Stash home 2015-06-15 11:27:06,562 INFO (50%) Waiting on Stash database backup to complete 2015-06-15 11:27:11,154 INFO (100%) Stash has completed backing up the database 2015-06-15 11:27:11,154 INFO (100%) Downloading database backup zip from Stash 2015-06-15 11:27:11,245 INFO (100%) Backup complete: /Users/tbomfim/stash-backup-client-1.4.0/backups/stash-20150615-112711-244.tar 2015-06-15 11:27:11,250 INFO (100%) Unlocking Stash using token: 63609bd8c8c052eab1e13f24654104b33347c2dc
Therefore, you can trust the backup that you have at hand and just restore with a newer version of the restore client as indicated on the message you shared with us. I am going to work on documenting this better on our Backup Client guide.
The cause for this is the same as the one described below:
From your description, though, you're creating the new database correctly. It should just work. Can you double check your character set encoding and collation are set correctly on your database (the KB above explains how)? Also, can you make sure you're connecting to the right server where you created this database?
Fixed! 1. The database needed flushing since I tried with 1.4.0 before trying with 1.9.1, which caused too many connections. 2. I forgot to add the database name in the properties file. (although I didn't think I had to enter anything in the recovery portion of property files since import was to same database name, ip ,etc.). But adding the database name worked:
Good to know that you're good to go. You can find examples of the JDBC URL on: https://confluence.atlassian.com/display/STASH/Using+the+Stash+Backup+Client#UsingtheStashBackupClient-ExampleuseofJDBCproperties
I did double check that the database was set up correctly and had utf8. I even dropped the database and recreated it several times. See below:
Any other suggestions?
Should I try downgrading my stash instance to an older version compatible with your 1.4.0 backup, import my backup using 1.4.0 and then upgrade stash instance back to 3.8.0? My concern with this process is that the backup data came out of 3.8.0 and may not import properly to an older version. But this seems like the only other option to try.
We’ve been building a plugin to integrate Bitbucket Server and Jenkins CI, and I’m excited to announce that our alpha is ready to download and install. It lets you seamlessly configure a Jenkins job ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events