X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=doc%2Fmd%2FUpgrade-and-migration.md;h=d5682a340dd35d650e8ed025ca4d5e75e666ba99;hb=8f6202deb0cbf58dd18bf0523c81fd24851e3b6c;hp=2002a4e21531bb272af26d04ab1569cd09a46a36;hpb=1fdb40fc169b42af7622610c4f088688de231118;p=github%2Fshaarli%2FShaarli.git diff --git a/doc/md/Upgrade-and-migration.md b/doc/md/Upgrade-and-migration.md index 2002a4e2..d5682a34 100644 --- a/doc/md/Upgrade-and-migration.md +++ b/doc/md/Upgrade-and-migration.md @@ -2,20 +2,22 @@ ### Note your current version -If anything goes wrong, it's important for us to know which version you're upgrading from. -The current version is present in the `version.php` file. +If anything goes wrong, it's important for us to know which version you're upgrading from. +The current version is present in the `shaarli_version.php` file. ### Backup your data Shaarli stores all user data under the `data` directory: -- `data/config.php` - main configuration file + +- `data/config.json.php` (or `data/config.php` for older Shaarli versions) - main configuration file - `data/datastore.php` - bookmarked links - `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) for more information about Shaarli resources. +See [Shaarli configuration](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 @@ -25,7 +27,7 @@ As all user data is kept under `data`, this is the only directory you need to wo - backup the `data` directory - install or update Shaarli: - - fresh installation - see [Download and installation](Download and installation) + - fresh installation - see [Download and Installation](Download-and-Installation) - update - see the following sections - check or restore the `data` directory @@ -33,10 +35,13 @@ As all user data is kept under `data`, this is the only directory you need to wo 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](Download and installation) for `git` complete instructions. +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) 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! +If you use translations in gettext mode - meaning you manually changed the default mode -, +reload your web server. + 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) for more details). ## Upgrading with Git @@ -70,11 +75,27 @@ Updating dependencies Downloading: 100% ``` +Shaarli >= `v0.9.2` supports translations: + +```bash +$ make translate +``` + +If you use translations in gettext mode, reload your web server. + +Shaarli >= `v0.10.0` manages its front-end dependencies with nodejs. You need to install +[yarn](https://yarnpkg.com/lang/en/docs/install/): + +```bash +$ make build_frontend +``` + ### 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. 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) - the default remote is named `origin` and points to Sebsauvage's repository - the current branch is `master` @@ -148,6 +169,21 @@ Updating dependencies Downloading: 100% ``` +Shaarli >= `v0.9.2` supports translations: + +```bash +$ make translate +``` + +If you use translations in gettext mode, reload your web server. + +Shaarli >= `v0.10.0` manages its front-end dependencies with nodejs. You need to install +[yarn](https://yarnpkg.com/lang/en/docs/install/): + +```bash +$ make build_frontend +``` + Optionally, you can delete information related to the legacy version: ```bash @@ -170,11 +206,14 @@ 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) 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.json.php` (see [Shaarli configuration](Shaarli-configuration) for more +details). ## Troubleshooting -If the solutions provided here doesn't work, please open an issue specifying which version you're upgrading from and to. +If the solutions provided here don't work, please open an issue specifying which version you're upgrading from and to. ### You must specify an integer as a key @@ -185,10 +224,10 @@ Take a look at `data/updates.txt` content. Try to delete it and refresh your page while being logged in. -#### `updates.txt` doesn't exists or doesn't contain `updateMethodDatastoreIds` +#### `updates.txt` doesn't exist or doesn't contain `updateMethodDatastoreIds` - 1. Create `data/updates.txt` if it doesn't exist. - 2. Paste this string in the update file `;updateMethodRenameDashTags;` - 3. Login to Shaarli. - 4. Delete the update file. - 5. Refresh. +1. Create `data/updates.txt` if it doesn't exist +2. Paste this string in the update file `;updateMethodRenameDashTags;` +3. Login to Shaarli +4. Delete the update file +5. Refresh