User avatar
punkrock
Lisker
Posts: 103
Joined: Thu Feb 25, 2016 6:41 pm
Location: Germany
Contact: Website Twitter

How To: Upgrade your Lisk client with one command

Tue Nov 15, 2016 7:36 am

Upgrade your Lisk client with one command

Tested on Ubuntu 16.04

Beforehand: You don't need to backup the config.json anymore NOR you don't need to change anything, after the upgrade. The update-script itself copies everything from your old config.json into the new one and even the version number is always correct. Thanks to Isabella for this feature!

Open this file:

Code: Select all

nano ~/.bashrc


At the end of the file paste this line:
ATTENTION! This command is prepared for the Mainnet. For your testnet node you need to replace main with test within the following code two times! You also may want to edit the installation path, but you don't have to. It's set to the standard home/$user-path. I also added -0 no, which allows you to automatically avoid that the client gets rebuilded from zero. If unwanted, delete it:

Code: Select all

alias lisk_upgrade='cd ~ && rm -rf installLisk*; wget https://downloads.lisk.io/lisk/main/installLisk.sh && bash installLisk.sh upgrade -r main -d /home/$USER -0 no'

Press CTRL + X. You'll be asked, if you want to save the changes. Agree with Y and ENTER.

Tell your system, that you've made these changes and type:

Code: Select all

source ~/.bashrc


Your command to upgrade the Lisk client:

Code: Select all

lisk_upgrade


Fin!
Now, you'll be able to upgrade your node with only one command (no matter, in which folder path you are): Just by typing lisk_upgrade into the terminal after our team released a new version for the testnet or the mainnet. You still need to enter the sudo password for your user, but it's still very useful.

Have fun!
Last edited by punkrock on Sun Jun 25, 2017 2:20 pm, edited 8 times in total.
Delegate name: punkrock
Address: 6853061742992593192L


Daniel B. - Former Lisk ambassador for Germany
Website | My delegate proposal | Twitter | Bitcointalk

wannabe
Posts: 9
Joined: Tue Apr 19, 2016 10:49 am

Re: How To: Upgrade your Lisk client with one command

Tue Nov 15, 2016 8:25 am

Nice feature. I would also add the

Code: Select all

-d /lisk_install/directory
option to the install script that specify where the lisk software is installed in order also the cover the situations where lisk is not installed in the user home directory.

Thank you for the idea.
Delegate name: wannabe_rotebaron
Address: 16379340065696424247L

Delegate & Introduction

User avatar
redsn0w
Global Moderator
Posts: 201
Joined: Sat Apr 02, 2016 8:41 am
Contact: Website

Re: How To: Upgrade your Lisk client with one command

Tue Nov 15, 2016 9:43 am

Thanks punkrock, really appreciated ;).

cryptostorms
Lisker
Posts: 152
Joined: Tue Apr 05, 2016 1:36 am
Location: Hawaii

Re: How To: Upgrade your Lisk client with one command

Tue Nov 15, 2016 9:46 am

Thanks! easy peasy :D

User avatar
punkrock
Lisker
Posts: 103
Joined: Thu Feb 25, 2016 6:41 pm
Location: Germany
Contact: Website Twitter

Re: How To: Upgrade your Lisk client with one command

Tue Nov 15, 2016 10:02 pm

wannabe wrote:Nice feature. I would also add the

Code: Select all

-d /lisk_install/directory
option to the install script that specify where the lisk software is installed in order also the cover the situations where lisk is not installed in the user home directory.

Thank you for the idea.


Thank you for this tip! I added this:

Code: Select all

-d /home/$USER
Delegate name: punkrock
Address: 6853061742992593192L


Daniel B. - Former Lisk ambassador for Germany
Website | My delegate proposal | Twitter | Bitcointalk

User avatar
punkrock
Lisker
Posts: 103
Joined: Thu Feb 25, 2016 6:41 pm
Location: Germany
Contact: Website Twitter

Re: How To: Upgrade your Lisk client with one command

Sun Jun 25, 2017 2:18 pm

I've added the possibility to upgrade without rebuilding from block zero. This is the current bashrc:

Code: Select all

alias lisk_upgrade='cd ~ && rm -rf installLisk*; wget https://downloads.lisk.io/lisk/main/installLisk.sh && bash installLisk.sh upgrade -r main -d /home/$USER -0 no'
Delegate name: punkrock
Address: 6853061742992593192L


Daniel B. - Former Lisk ambassador for Germany
Website | My delegate proposal | Twitter | Bitcointalk

Return to “Guides”

Who is online

Users browsing this forum: No registered users and 1 guest