A CLI application to manage Omeka S installations.
- Clone the repository to a location of your choice
git clone https://github.com/indic-archive/omeka-s-cli.git
- Install the composer packages
cd omeka-s-cli composer install
- Create a symlink to the application in your bin directory.
ln -s /path/to/where/you/clone/above/repo/app/app.php ~/bin/omeka-s-cli chmod +x ~/bin/omeka-s-cli
You may create the file .omeka-s-cli.yml
in your home directory and put this content in to it:
backup-dir: /home/omeka/backups/
backup-restore-disallow:
- '/home/omeka/www'
- backup-dir
- Directory path where backups will be kept on creation and taken for restoring.
- backup-restore-disallow
- List of directory of Omeka S installation to prevent restoring backups. This will protect production sites from accidental overwriting.
You can run the base command to get help and list of sub-commands.
omeka-s-cli
Let's assume your Omeka S instance is installed at /home/omeka/www
omeka-s-cli backup:create --site-dir=/home/omeka/www "A backup before doing something unexpected"
omeka-s-cli backup:restore --site-dir=/home/omeka/www
This will list all available backups already in the backup directory and you can choose one to restore.
Warning
Make sure to select correct backup when restoring a production site. The files and database of the site will be replaced
This will prompt to update to the latest release available.
omeka-s-cli update --site-dir=/home/omeka/www
If you want to update to a specific version, run below given command. It will give you options to choose.
omeka-s-cli update --site-dir=/home/omeka/www --list
Note
Right now there is no detection of existing Omeka S version installed. So, it is your responsibility to make sure you are updating from a lower version to higher.
To update. Pull code changes:
git pull
and run composer update:
composer update