Skip to content

zomeki/zplugin3-sitebk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zplugin::Sitebk

ZOMEKIのデータベースをサイト単位でバックアップするプラグインです。

想定環境

  • ZOMEKI3 build-70+

インストール

Gemfileに追加します。

gem 'zplugin3-sitebk', github: 'zomeki/zplugin3-sitebk'

以下を実行します。

$ bundle

使用方法

サイトID=1のデータをダンプします。

bundle exec rake zomeki:db:site:dump SITE_ID=1

ダンプファイルはHOME/sites/SITE_ID/db以下に保存されます。保存ディレクトリを変更する場合は次のようにします。

bundle exec rake zomeki:db:site:dump SITE_ID=1 DIR=/path/to/your/dir

全サイトのデータをダンプします。

bundle exec rake zomeki:db:site:dump_all

サイトID=1のデータをリストアします。

bundle exec rake zomeki:db:site:restore SITE_ID=1

バックアップ対象

バックアップ対象はin_siteスコープが定義済のモデルです。

class Cms::Content < ApplicationRecord
  scope :in_site, ...
end

License

The gem is available as open source under the terms of the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages