X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=doc%2Fmd%2FUpgrade-and-migration.md;fp=doc%2FUpgrade-and-migration.md;h=7348891f31176e90f1357d5b00938d11de02b6c5;hb=53ed6d7d1e678d7486337ce67a2f17b30bac21ac;hp=d36eb862f04124da87039778545a5bd96afd85b9;hpb=d5d22a6d07917865c44148ad76f43c65a929a890;p=github%2Fshaarli%2FShaarli.git diff --git a/doc/Upgrade-and-migration.md b/doc/md/Upgrade-and-migration.md similarity index 83% rename from doc/Upgrade-and-migration.md rename to doc/md/Upgrade-and-migration.md index d36eb862..7348891f 100644 --- a/doc/Upgrade-and-migration.md +++ b/doc/md/Upgrade-and-migration.md @@ -1,5 +1,5 @@ -#Upgrade and migration ## Preparation + ### Note your current version If anything goes wrong, it's important for us to know which version you're upgrading from. @@ -13,33 +13,37 @@ Shaarli stores all user data under the `data` directory: - `data/ipbans.php` - banned IP addresses - `data/updates.txt` - contains all automatic update to the configuration and datastore files already run -See [Shaarli configuration](Shaarli-configuration.html) for more information about Shaarli resources. +See [[Shaarli configuration]] for more information about Shaarli resources. It is recommended to backup this repository _before_ starting updating/upgrading Shaarli: - users with SSH access: copy or archive the directory to a temporary location - users with FTP access: download a local copy of your Shaarli installation using your favourite client ### Migrating data from a previous installation + As all user data is kept under `data`, this is the only directory you need to worry about when migrating to a new installation, which corresponds to the following steps: - backup the `data` directory - install or update Shaarli: - - fresh installation - see [Download and installation](Download-and-installation.html) + - fresh installation - see [[Download and installation]] - update - see the following sections - check or restore the `data` directory ## Recommended : Upgrading from release archives -All tagged revisions can be downloaded as tarballs or ZIP archives from the [releases](https://github.com/shaarli/Shaarli/releases) page.[](.html) -We recommend that you use the latest release tarball with the `-full` suffix. It contains the dependencies, please read [Download and installation](Download-and-installation.html) for `git` complete instructions. +All tagged revisions can be downloaded as tarballs or ZIP archives from the [releases](https://github.com/shaarli/Shaarli/releases) page. + +We recommend that you use the latest release tarball with the `-full` suffix. It contains the dependencies, please read [[Download and installation]] for `git` complete instructions. Once downloaded, extract the archive locally and update your remote installation (e.g. via FTP) -be sure you keep the content of the `data` directory! -After upgrading, access your fresh Shaarli installation from a web browser; the configuration and data store will then be automatically updated, and new settings added to `data/config.json.php` (see [Shaarli configuration](Shaarli-configuration.html) for more details). +After upgrading, access your fresh Shaarli installation from a web browser; the configuration and data store will then be automatically updated, and new settings added to `data/config.json.php` (see [[Shaarli configuration]] for more details). ## Upgrading with Git + ### Updating a community Shaarli -If you have installed Shaarli from the [community Git repository](Download#clone-with-git-recommended), simply [pull new changes](https://www.git-scm.com/docs/git-pull) from your local clone:[](.html) + +If you have installed Shaarli from the [community Git repository](Download#clone-with-git-recommended), simply [pull new changes](https://www.git-scm.com/docs/git-pull) from your local clone: ```bash $ cd /path/to/shaarli @@ -55,7 +59,7 @@ Fast-forward 3 files changed, 3 insertions(+), 1 deletion(-) ``` -Shaarli >= `v0.8.x`: install/update third-party PHP dependencies using [Composer](https://getcomposer.org/):[](.html) +Shaarli >= `v0.8.x`: install/update third-party PHP dependencies using [Composer](https://getcomposer.org/): ```bash $ composer install --no-dev @@ -67,18 +71,20 @@ Updating dependencies ``` ### Migrating and upgrading from Sebsauvage's repository -If you have installed Shaarli from [Sebsauvage's original Git repository](https://github.com/sebsauvage/Shaarli), you can use [Git remotes](https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes) to update your working copy.[](.html) + +If you have installed Shaarli from [Sebsauvage's original Git repository](https://github.com/sebsauvage/Shaarli), you can use [Git remotes](https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes) to update your working copy. The following guide assumes that: -- you have a basic knowledge of Git [branching](https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell) and [remote repositories](https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes)[](.html) +- you have a basic knowledge of Git [branching](https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell) and [remote repositories](https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes) - the default remote is named `origin` and points to Sebsauvage's repository - the current branch is `master` - - if you have personal branches containing customizations, you will need to [rebase them](https://git-scm.com/book/en/v2/Git-Branching-Rebasing) after the upgrade; beware though, a lot of changes have been made since the community fork has been created, so things are very likely to break![](.html) + - if you have personal branches containing customizations, you will need to [rebase them](https://git-scm.com/book/en/v2/Git-Branching-Rebasing) after the upgrade; beware though, a lot of changes have been made since the community fork has been created, so things are very likely to break! - the working copy is clean: - no versioned file has been locally modified - no untracked files are present #### Step 0: show repository information + ```bash $ cd /path/to/shaarli @@ -87,7 +93,7 @@ origin https://github.com/sebsauvage/Shaarli (fetch) origin https://github.com/sebsauvage/Shaarli (push) $ git branch -vv -* master 029f75f [origin/master] Update README.md[](.html) +* master 029f75f [origin/master] Update README.md $ git status On branch master @@ -96,6 +102,7 @@ nothing to commit, working directory clean ``` #### Step 1: update Git remotes + ``` $ git remote rename origin sebsauvage $ git remote -v @@ -111,11 +118,11 @@ remote: Total 3015 (delta 446), reused 457 (delta 446), pack-reused 2550 Receiving objects: 100% (3015/3015), 2.59 MiB | 918.00 KiB/s, done. Resolving deltas: 100% (1899/1899), completed with 48 local objects. From https://github.com/shaarli/Shaarli - * [new branch] master -> origin/master[](.html) - * [new branch] stable -> origin/stable[](.html) -[...][](.html) - * [new tag] v0.6.4 -> v0.6.4[](.html) - * [new tag] v0.7.0 -> v0.7.0[](.html) + * [new branch] master -> origin/master + * [new branch] stable -> origin/stable +[...] + * [new tag] v0.6.4 -> v0.6.4 + * [new tag] v0.7.0 -> v0.7.0 ``` #### Step 2: use the stable community branch @@ -126,11 +133,11 @@ Branch stable set up to track remote branch stable from origin. Switched to a new branch 'stable' $ git branch -vv - master 029f75f [sebsauvage/master] Update README.md[](.html) -* stable 890afc3 [origin/stable] Merge pull request #509 from ArthurHoaro/v0.6.5[](.html) + master 029f75f [sebsauvage/master] Update README.md +* stable 890afc3 [origin/stable] Merge pull request #509 from ArthurHoaro/v0.6.5 ``` -Shaarli >= `v0.8.x`: install/update third-party PHP dependencies using [Composer](https://getcomposer.org/):[](.html) +Shaarli >= `v0.8.x`: install/update third-party PHP dependencies using [Composer](https://getcomposer.org/): ```bash $ composer install --no-dev @@ -162,7 +169,8 @@ Total 3317 (delta 2050), reused 3301 (delta 2034)to ``` #### Step 3: configuration -After migrating, access your fresh Shaarli installation from a web browser; the configuration will then be automatically updated, and new settings added to `data/config.php` (see [Shaarli configuration](Shaarli-configuration.html) for more details). + +After migrating, access your fresh Shaarli installation from a web browser; the configuration will then be automatically updated, and new settings added to `data/config.php` (see [[Shaarli configuration]] for more details). ## Troubleshooting