Currently Viewing Posts Tagged server

Migrating GitLab to another Server from Ubuntu 16.04 to Ubuntu 18.04

Because my old Gitlab is running on a Ubuntu 16.04 server. The latest LTS version of Ubuntu is already 18.04 for more than one year. I was thinking about to directly upgrade the server from 16.04 to 18.04.  There are still some chances it may fail and the server may crash. I can not afford to lose the data.

So the final decision is to migrate the Gitlab from the old server Ubuntu 16.04 to a new server with  Ubuntu 18.04.

This is how to do it.

First, I install the new server on my Proxmox VE environment with Ubuntu 18.04. 3CPU Cores and 4GB memory and 64GB storage. Meanwhile, the old server still uses Ubuntu 16.04. And the Gitlab version that I use is 12.4.2

On the Old Server

  1.  Shutdown Gitlab service
    sudo gitlab-ctl stop unicorn
    sudo gitlab-ctl stop sidekiq
  2. Backup Gitlab on the old server
    sudo gitlab-rake gitlab:bakcup:create
  3. Create a folder named gitlab-old
    mkdir ~/gitlab-old
  4. Copy the backup file to the folder ~/gitlab-old
    sudo cp ~/backups/xxxxxxxx_gitlab_backup.tar ~/gitlab-old
  5. Copy the Gitlab configuration files
    sudo cp /etc/gitlab/gitlab.rb ~/gitlab-old
    sudo cp /etc/gitlab/gitlab-secrets.json ~/gitlab-old
    sudo cp -R /etc/gitlab/ssl ~/gitlab-old

Then all the important files are under folder ~/gitlab-old

My configuration of Gitlab changed the backup folder to ~/backups. The default path is /var/opt/gitlab/backups/

You can change it on the “Backup Settings” section in the file gitlab.rb

 

To verify the version of your gitlab installation, enter the following command.

sudo gitlab-rake gitlab:env:info

On the New Server

The server is a clean installation of Ubuntu 18.04. The only service is SSH  and postfix.

Before doing the migration, I transfer the whole folder ~/gitlab-old from the old server to this new server.

  1.  Add Gitlab source
    curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
  2.  Install Gitlab 12.4.2 CE
    sudo apt update
    sudo apt install gitlab-ce=12.4.2
  3. Copy the configuration files to folder /etc/gitlab
    sudo cp ~/gitlab-old/gitlab* /etc/gitlab
  4. Copy the ssl folder to folder /etc/gitlab
    sudo cp -R ~/gitlab-old/ssl /etc/gitlab
  5. Run Gitlab service for the first time
    sudo gitlab-ctl reconfigure
  6. Shutdown the Gitlab services
    sudo gitlab-ctl stop unicorn
    sudo gitlab-ctl stop sidekiq
  7. Copy the backup file to ~/backups then change the permission
    sudo cp ~/gitlab-old/*.tar ~/backups
    sudo chown git:root ~/backups/*.tar
  8. Restore the Gitlab backup file
    sudo gitlab-rake gitlab:backup:restore BACKUP=XXXXXX
  9. Restart Gitlab and check
    sudo gitlab-ctl start
    sudo gitlab-rake gitlab:check SANITIZE=true

There are some notes for the above nine steps.

The backup file name looks like 1573175514_2019_11_07_12.4.2_gitlab_backup.tar. So the code in the step 8, BACKUP=1573175514_2019_11_07_12.4.2

The version of Gitlab I am using 12.4.2. I install the 12.4.2 on step 2. When I do the restore in step 8, it displays the error, the version does not match. The backup is 12.4.2, but the installation is 12.4.1. I have to do the apt update and apt upgrade to upgrade the Gitlab from 12.4.1 to 12.4.2. I am not sure where the problem came from. Just a reminder, double-check the version installed on the new server.

At the first step of adding the repo source, I always get the network error on my server. I believed it is the problem of guest OS on Proxmox VE. So I actually add the repo source and public key of gitlab source manually.

My current Gitlab information on the new server Ubuntu 18.04

davidyin@gitlab:~$ sudo gitlab-rake gitlab:env:info

System information
System: Ubuntu 18.04
Current User: git
Using RVM: no
Ruby Version: 2.6.3p62
Gem Version: 2.7.9
Bundler Version:1.17.3
Rake Version: 12.3.3
Redis Version: 3.2.12
Git Version: 2.22.0
Sidekiq Version:5.2.7
Go Version: unknown

GitLab information
Version: 12.4.2
Revision: 393a5bdafa2
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: PostgreSQL
DB Version: 10.9
URL: https://gitlab.g2soft.net
HTTP Clone URL: https://gitlab.g2soft.net/some-group/some-project.git
SSH Clone URL: git@gitlab.g2soft.net:some-group/some-project.git
Using LDAP: no
Using Omniauth: yes
Omniauth Providers:

GitLab Shell
Version: 10.2.0
Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories
GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell
Git: /opt/gitlab/embedded/bin/git

At the end, I should give the credit to Didiet A. Pambudiono. Most of the steps above is based on this post.

New CPU model of Linode Fremont

Recently I placed an order of a new VPS at Linode. It has a new CPU type.

Intel(R) Xeon(R) CPU E5-2697 v4 @ 2.30GHz, 1 cores

Another VPS I bought with Linode from July 2017, has Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz, 1 cores

Let me check these difference between E5-2697 v4 and E5-2680 v2.

First place I checked is cpu-world.

The Specification

Continue reading “New CPU model of Linode Fremont”

Waiting for the Ubuntu 18.04 LTS

Based on the schedule of release, Ubuntu 18.04 LTS (Bionic Beaver) will be released on April 26, 2018, the day after tomorrow.

Now, my all VPS is running on the Ubuntu 16.04 LTS. LTS is an abbreviation for “Long Term Support”.  An LTS version is released every two years. So after Ubuntu 16.04 LTS, it is Ubuntu 18.04 LTS.  Now all LTS version has five years support.

I can use Ubuntu 16.04 LTS until 2021. Security updates will be released during the time period.

I am waiting for the release of Ubuntu 18.04 LTS. I would like to try it on my staging server, or a virtual machine. Try all my existing web programs on Ubuntu 18.04 LTS. Find the compatible problems then fix them.

Maybe after a few months testing. I am sure there are no issues with it. I will install a new VPS with Ubuntu 18.04 LTS and move the websites to it.

Continue reading “Waiting for the Ubuntu 18.04 LTS”

Upgrade to Calibre 3.0

It is a big upgrade. New version serials, starting 3.x.

Calibre 3.0 is released on June 16, 2017. Calibre 2.x is starting almost two years ago.

What is New in Calibre 3.0?

  • The new Content server
    • You can start the Content server by clicking the Connect/share button in calibre. Then just open up a browser and type http://localhost:8080 in the address bar. You will see a list of calibre libraries. Click on one and browse the books. Click on a book and you will have the option to read or download it.
  • Support for High Resolution (Retina) screens
  • Support for icon themes and a new default icon set
  • Conversion to Microsoft Word (DOCX)
  • Backwards incompatibilities

 

 

Here is the list of new features for Calibre 3.0:

  • For details on the major changes in calibre between 2.0 and 3.0, see https://calibre-ebook.com/new-in/twelve
  • A completely re-written Content server with support for reading books in-browser on your phone/tablet. Also works in offline mode.
  • Support for high resolution (Retina screens)
  • A new splash screen to celebrate the release of calibre 3
  • Minor tweaking of the main user interface to emphasize the core features

 

Download 64bit Windows version Calibre here https://calibre-ebook.com/download_windows64

CloudatCost VPS – an VPS service provider from Canada

I am customer of CloudatCost, which is a VPS service provider at Ontario, Canada.

I saw the Ads on twitter, or just someone make a tweet. The most interesting thing is the one time payment and no more recurring invoice. Only one time setup fee.  It also has monthly plan.

For example, the very basic plan, Developer 1, $1/month or $35/one time.

If subscribe the monthly plan, it will be $1/month, after a year, you paid $12.  One time fee $35 is about three year subscription fee. So pay three year service in the front. That’s it. You own the plan for ever.

cloudatcost-plans

I purchased plan Developer 2, by one time fee.

Developer 2:

  • $10/month or $70/one time
  • 2 Xeon vCPU
  • 1 public IP
  • 1GB ECC RAM
  • 20GB SSD
  • 100Mbit Network
  • 1TB monthly transfer

 

I have a coupon for 50% off, that means you just need to pay $35/one time fee, you can have it for ever. See the coupon code :

Continue reading “CloudatCost VPS – an VPS service provider from Canada”

Switch to bzip2 compression on my server backup scripts

Previously I used gzip as compression tool to compress the web site files and mysql database.  It is still working on my Linode server. I learned something from the compairasion from this post .

So I tried to use bzip instead of gzip on my backup script.

Here is two examples.

1) Mysqldump file, which is a text sql file.

The original sql file is 52,317KB

  • gzip with level 9 (best) compression:  23,227KB  – Compress Ratio 44.39%
  • bzip2 with default (I think it is level 9) compression: 19,666KB – Compress Ratio 37.59%

Bzip2 is smaller than gzip file. It reduced about 15%.

2) Website files, including php, jpeg, png, css, any files used in web site.

The original tar gile is 187,670KB

  • gzip compression: 42,101KB – Ratio 22.43%
  • bzip2 compression: 34,753KB – Ratio 18.51%

Bzip2 is better. Backup file size is reduced by about 17%.

Continue reading “Switch to bzip2 compression on my server backup scripts”

A new VPS service provider – Vultr

I  just ordered a new VPS from Vultr.com.

It has All SSD. Maybe the lowest price per memory. Pay $0.007/hr, you get 768MB RAM, 3GHz CPU and 15GB storage. It is about $5/month.

And more datacenters than other VPS service providers. There are 14 locations worldwide, right now.

I did following test though Benchmark Serverbear.

The simply results as below.

UnixBench score: 2242.1

I/O rate: 409.0 MB/second

Bandwidth rate: 97.4 MB/secon

Continue reading “A new VPS service provider – Vultr”

Ubuntu 14.10 and phpBB 3.1.0 released

Ubuntu is always a good desktop Linux distributation in the world. In the past years. more and more are installed as servers. Now I have four VPS are running under ubuntu, from 12.04 to 14.04.

Ubuntu 14.10 server is not a LTS edition. It will be supported in 9 months. Actually it will be upgrade to new version in 6 months.

ubuntu1410

Download Ubuntu 14.10 server here.

There is also a web forum programe has a new release. It is phpBB 3.1.0. The previous version of phpBB is 3.0.12, released on Sep 28, 2013, more than one year ago.

So I will take a trial installation on the new Ubuntu 14.10 Server. It is cool to have a test run on both new software.

phpbb310

 

Linode VPS connection issue

Today, my VPS at Linode has problem. It can not connected for 3 hours. Later, I got a email from Linode, which displayed that my VPS restarted.

Newark Connectivity Issues

Sunday, April 13, 2014

3:05AM EDT (UTC -4): Many Linodes are booted at this time and we are working with the remaining hosts to fully restore services. We apologize for any inconvenience caused by this event.

1:56AM EDT (UTC -4): Some Linodes have been booted at this time however, we are still working on bringing all Linodes to a running state. We will continue to keep you updated as we have further information.

1:09AM EDT (UTC -4): The Newark datacenter has suffered from a power outage. We are working on bringing Linodes back up as soon as possible.

12:40AM EDT (UTC -4): We are still working with the Newark datacenter to resolve this issue. We apologize for any inconvenience caused.

Saturday, April 12, 2014

11:51PM EDT (UTC -4): We are investigating an issue with connectivity within the Newark datacenter at this time. We will post updates as we have them. We apologize for any inconvenience.

 

linode-down

How to enable SSH server in DD-WRT router

The router is Buffalo WZR-HP-G300NH2, flashed with DD-WRT v24-sp2 build 21676.

The SSH server settings is under Tab Services, Services.

dd-wrt-sshd-1

The section is called Secure Shell

dd-wrt-sshd-2

Select Enable for SSHd, keep the others as is. Then click Save and Apply Settings.

After that, you can use Putty to ssh to router. Let us have a look at my router.

dd-wrt-ssh-box

The login user name is root, not the one for web ui.

Password is the one to sign in web ui.

  • Archives