Skip to content

Stretch to Buster migration (and Elkarbackup v1.3.5 to v2.x.x) help guide #24

@xezpeleta

Description

@xezpeleta

I've recently upgraded a Elkarbackup server, from Stretch to Buster. I had some small issues and maybe we should publish a guide helping people in the same situation (I still don't know if it only happened to me):

Below I add some logs:

# After editing the sources.list, Debian recommends two-part upgrade process. So do I.
# https://www.debian.org/releases/stable/amd64/release-notes/ch-upgrading.en.html#minimal-upgrade

$ apt update && apt upgrade

(...)

Preparing to unpack .../109-elkarbackup_2.0.1_all.deb ...
Unpacking elkarbackup (2.0.1) over (1.3.5) ...
dpkg: warning: unable to delete old directory '/usr/share/elkarbackup/src/Binovo/ElkarBackupBundle/Resources/views/Default': Directory not empty
dpkg: warning: unable to delete old directory '/usr/share/elkarbackup/src/Binovo/ElkarBackupBundle/Resources/views': Directory not empty
dpkg: warning: unable to delete old directory '/usr/share/elkarbackup/src/Binovo/ElkarBackupBundle/Resources': Directory not empty
dpkg: warning: unable to delete old directory '/usr/share/elkarbackup/src/Binovo/ElkarBackupBundle/Lib': Directory not empty
dpkg: warning: unable to delete old directory '/usr/share/elkarbackup/src/Binovo/ElkarBackupBundle': Directory not empty
dpkg: warning: unable to delete old directory '/usr/share/elkarbackup/src/Binovo': Directory not empty

Setting up elkarbackup (2.0.1) ...

Configuration file '/etc/apache2/conf-available/elkarbackup.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** elkarbackup.conf (Y/I/N/O/D/Z) [default=N] ? Y
Installing new version of config file /etc/apache2/conf-available/elkarbackup.conf ...

Configuration file '/etc/apache2/sites-available/elkarbackup.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** elkarbackup.conf (Y/I/N/O/D/Z) [default=N] ? Y
Installing new version of config file /etc/apache2/sites-available/elkarbackup.conf ...
Installing new version of config file /etc/apache2/sites-available/elkarbackup-ssl.conf ...

Configuration file '/etc/cron.d/elkarbackup'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** elkarbackup (Y/I/N/O/D/Z) [default=N] ? Y  
Installing new version of config file /etc/cron.d/elkarbackup ...

Using /etc/elkarbackup/parameters.yaml configuration ok
DB seems to be ready
Adding missing parameters as required
Delete cache content
Update DB
Create root user
Clean cache
Invalidate sessions
Setting permissions
apache2.service is not active, cannot reload.
invoke-rc.d: initscript apache2, action "reload" failed.
dpkg: error processing package elkarbackup (--configure):
 installed elkarbackup package post-installation script subprocess returned error exit status 1

# It failed, but I guess it's because I need to do the dist-upgrade

$ apt dist-upgrade # (should I have typed "apt full-upgrade" ?)


Setting up elkarbackup (2.0.1) ...
Using /etc/elkarbackup/parameters.yaml configuration ok
DB seems to be ready
Adding missing parameters as required
Delete cache content
Update DB
Create root user
Clean cache
Invalidate sessions
Setting permissions

# Now the installation finished ok, but http://elkarbackup doesn't work
# I see the following error in the Apache logs:

[Wed May 05 14:14:22.001233 2021] [:error] [pid 4884] [client 192.168.10.1:36348] PHP Parse error:  syntax error, unexpected '?' in /usr/share/elkarbackup/public/index.php on line 15

# Restarting Apache2 or rebooting the machine does not work either
# I looks is a problem related to PHP version. Let's check it:

root@elkarbackup:/usr/share/elkarbackup# ./bin/console about
 -------------------- ------------------------------------------- 
  Symfony                                                         
 -------------------- ------------------------------------------- 
  Version              4.4.20                                     
  Long-Term Support    Yes                                        
  End of maintenance   11/2022                                    
  End of life          11/2023                                    
 -------------------- ------------------------------------------- 
  Kernel                                                          
 -------------------- ------------------------------------------- 
  Type                 App\Kernel                                 
  Environment          prod                                       
  Debug                false                                      
  Charset              UTF-8                                      
  Cache directory      ./var/cache/prod (5.7 MiB)                 
  Log directory        ./var/log (657.3 MiB)                      
 -------------------- ------------------------------------------- 
  PHP                                                             
 -------------------- ------------------------------------------- 
  Version              7.3.27-1~deb10u1                           
  Architecture         64 bits                                    
  Intl locale          n/a                                        
  Timezone             Europe/Berlin (2021-05-05T14:15:29+02:00)  
  OPcache              true                                       
  APCu                 false                                      
  Xdebug               false                                      
 -------------------- ------------------------------------------- 
  Environment (.env)                                              
 -------------------- ------------------------------------------- 
  APP_ENV              prod                                       
 -------------------- ------------------------------------------- 


# The console looks good (it seems using php-cli?), but I discovered PHP5 was still loaded on my Apache2:

$ ls /etc/apache2/mods-enabled/
php5.load
php5.conf

# Let's fix that:
$ a2dismod php5
$ a2enmod php7.3

# YES, ELKARBACKUP IS WORKING
# We can delete all PHP5 related packages from our system

apt remove php5*
apt autoremove
systemctl restart apache2

There is still one more issue.
I don't see my current parameters.yml value on "Parameters" form.
UPDATE: actually it's an issue elkarbackup/elkarbackup#538

cd /usr/share/elkarbackup
./bin/console cache:clear

TO BE CONTINUED

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions