Difference between revisions of "Upgrade release"

From postmarketOS
Jump to navigation Jump to search
m (Replace the upgrade instructions for a link to how to install a new image)
 
(One intermediate revision by the same user not shown)
Line 20: Line 20:
 
= Upgrading phone =
 
= Upgrading phone =
  
Currently it's recommended to download an image for the new release and install it rather than upgrading your device. However, upgrading is still possible and <i>should</i> work normally but we are not responsible for any broken installations.
+
Currently we don't support upgrading your device directly. Instead you will have to download a new updated image and install that. Instructions for the PinePhone can be found on [https://wiki.postmarketos.org/wiki/PINE64_PinePhone_(pine64-pinephone)#Installation the device wiki page].
 
 
As an example, to upgrade from the 20.05 to 21.03 release of postmarketOS, run on your phone:
 
# sed -i -e "s/v21.03/v20.05/g" /etc/apk/repositories
 
# sed -i -e "s/v3.12/v3.13/g" /etc/apk/repositories
 
# apk update
 
# apk upgrade --available
 
 
 
{{note|Make sure you upgrade with the <code>--available</code> switch, otherwise you might keep some old packages}}
 
  
 
= Restoring data =
 
= Restoring data =

Latest revision as of 15:26, 31 March 2021

Currently there is no supported and safe way to upgrade between postmarketOS releases, so we provide instructions on how to backup your data before you either begin a manual upgrade or reinstall a newer version.

These steps will be done with the terminal and a separate laptop or desktop computer is required.

Backing up data

Make sure rsync is installed on your phone and PC before you begin and SSH is enabled.

On your PC, create a folder where you want to backup your phone data too. In our example we'll use ~/postmarketOS_backup.

$ mkdir ~/postmarketOS_backup
$ rsync -avz --exclude=.cache <ip address of your phone>:/home/<your username>/ ~/postmarketOS_backup/
Note the multiple / in the rsync command, they are important!

-a makes sure rsync runs in archive mode, -v increases verbosity so you can see the files being transferred, and -z compresses the files during transfer to speedup the transferring. --exclude=.cache makes sure the ~/.cache directory is skipped, as those files are temporary and do not need backing up.

You can now see all your files from your phone on your PC in ~/postmarketOS_backup

Upgrading phone

Currently we don't support upgrading your device directly. Instead you will have to download a new updated image and install that. Instructions for the PinePhone can be found on the device wiki page.

Restoring data

After making sure your upgraded or new installation is running properly it's time to restore the data you backed up earlier. Make sure rsync is still installed and SSH is still enabled.

From your PC:

$ rsync -avzu ~/postmarketOS_backup/ <ip address of your phone>:/home/<your username>/

The single letter arguments to rsync are the same with the notable exception of -u. That arguments makes sure files that are newer on the destination (phone) are skipped. This is mainly needed for cases where processes running on the phone constantly alter files (and are thus newer) like KDE's Baloo.