📢 Webサイト閉鎖と移転のお知らせ
このWebサイトは2026年9月に閉鎖いたします。
新しい記事は移転先で追加しております。(旧サイトでは記事を追加しておりません)
ページの作成:「== 概要 == Timeshiftは、システムレベルのバックアップに最適なオープンソースのバックアップおよび復元ソフトウェアである。<br> Windowsのシステムの復元やMacOSのTime Machineのような機能を提供する。<br> <br> Rsyncコマンドとハードリンクを使用して、増分アプローチでスナップショットを取得する。<br> Timeshiftを使用することにより、例えば、何かをイン…」 |
|||
| (同じ利用者による、間の7版が非表示) | |||
| 20行目: | 20行目: | ||
* クロスディストリビューション・リストアのサポート | * クロスディストリビューション・リストアのサポート | ||
<br> | <br> | ||
TimeShiftは、現在、Linux Mintプロジェクトによって管理されている。<br> | |||
https://github.com/teejee2008/timeshift<br> | 課題追跡の未解決の項目で関連性のあるものは、新しいリポジトリに問い合わせること。<br> | ||
<br> | |||
また、TimeshiftのソースコードはLinux MintのGitHubで入手できる。<br> | |||
* https://github.com/linuxmint/timeshift (新) | |||
* https://github.com/teejee2008/timeshift (旧) | |||
<br> | |||
旧リポジトリにはTimeShiftのオリジナルのソースコードが含まれており、重複を避けるためにアーカイブされている。<br> | |||
<br><br> | <br><br> | ||
| 40行目: | 46行目: | ||
#: <code>cp -r timeshift-* <TimeShiftのインストールディレクトリ></code> | #: <code>cp -r timeshift-* <TimeShiftのインストールディレクトリ></code> | ||
<br> | <br> | ||
==== ソースコードからインストール ==== | |||
# ビルドに必要なライブラリをインストールする。 | |||
#: <code>sudo zypper install gtk3-devel vala libvala-0_54-0 libvala-0_54-devel libgee-devel vte-devel json-glib-devel libxapp-devel help2man</code> | |||
# [https://github.com/linuxmint/timeshift TimeShiftのGithub]にアクセスして、ソースコードをダウンロードする。 | |||
# ダウンロードしたファイルを解凍する。 | |||
#: <code>tar xf timeshift-master.<Linux Mintのフレーバ名>.tar.gz</code> | |||
#: <code>cd timeshift-master.<Linux Mintのフレーバ名></code> | |||
# TimeShiftをビルドおよびインストールする。 | |||
#: <code>meson setup ./build -Dprefix=<TimeShiftのインストールディレクトリ></code> | |||
#: <code>ninja -C ./build</code> | |||
#: <code>ninja -C ./build install</code> | |||
<br> | |||
TimeShiftの実行に必要なライブラリをインストールする。<br> | |||
sudo zypper install libxapp1 | |||
<br> | |||
===== 任意のディレクトリにインストールする場合 ===== | |||
<u>もし、TimeShiftを任意のディレクトリにインストールした場合、設定ファイルおよびPolKitアクションファイルを手動で作成する必要がある。</u><br> | |||
<br> | |||
まず、TimeShiftの実行スクリプトを編集する。<br> | |||
sudo vi /<TimeShiftのインストールディレクトリ>/bin/timeshift-launcher | |||
<br> | |||
<syntaxhighlight lang="bash"> | |||
# /<TimeShiftのインストールディレクトリ>/bin/timeshift-launcherファイル | |||
# 編集前 | |||
app_command='timeshift-gtk' | |||
# 編集後 | |||
# use -f to make the readlink path absolute | |||
dirname="$(dirname -- "$(readlink -f -- "${0}")" )" | |||
if [ "$dirname" = "." ]; then | |||
dirname="$PWD/$dirname" | |||
fi | |||
export LANG="ja_JP.utf8" | |||
export TEXTDOMAIN="timeshift" | |||
export TEXTDOMAINDIR="$dirname/../share/locale" | |||
export XDG_DATA_DIRS="$dirname/../share:$XDG_DATA_DIRS" | |||
app_command="$dirname/timeshift-gtk" | |||
#app_command='timeshift-gtk' | |||
</syntaxhighlight> | |||
<br> | |||
次に、TimeShiftの設定ファイルを作成する。<br> | |||
sudo mkdir -p /etc/timeshift/default.json | |||
sudo vi /etc/timeshift/default.json | |||
<br> | |||
<syntaxhighlight lang="json-ld"> | |||
# /etc/timeshift/default.jsonファイル | |||
{ | |||
"backup_device_uuid" : "", | |||
"parent_device_uuid" : "", | |||
"do_first_run" : "true", | |||
"btrfs_mode" : "false", | |||
"include_btrfs_home" : "false", | |||
"stop_cron_emails" : "true", | |||
"schedule_monthly" : "false", | |||
"schedule_weekly" : "false", | |||
"schedule_daily" : "false", | |||
"schedule_hourly" : "false", | |||
"schedule_boot" : "false", | |||
"count_monthly" : "2", | |||
"count_weekly" : "3", | |||
"count_daily" : "5", | |||
"count_hourly" : "6", | |||
"count_boot" : "5", | |||
"snapshot_size" : "0", | |||
"snapshot_count" : "0", | |||
"exclude" : [ | |||
], | |||
"exclude-apps" : [ | |||
] | |||
} | |||
</syntaxhighlight> | |||
<br> | |||
次に、PolKitアクションファイルを作成する。<br> | |||
sudo vi /usr/share/polkit-1/actions/in.teejeetech.pkexec.timeshift.policy | |||
<br> | |||
<syntaxhighlight lang="xml"> | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" | |||
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"> | |||
<policyconfig> | |||
<vendor>Tony George</vendor> | |||
<vendor_url>https://github.com/teejee2008</vendor_url> | |||
<action id="in.teejeetech.pkexec.timeshift-gtk"> | |||
<message gettext-domain="timeshift">Authentication is required to run Timeshift as Administrator</message> | |||
<description>Run Timeshift as Administrator</description> | |||
<icon_name>timeshift</icon_name> | |||
<defaults> | |||
<allow_any>auth_admin</allow_any> | |||
<allow_inactive>auth_admin</allow_inactive> | |||
<allow_active>auth_admin</allow_active> | |||
</defaults> | |||
<annotate key="org.freedesktop.policykit.exec.path">/<TimeShiftのインストールディレクトリ>/bin/timeshift-gtk</annotate> | |||
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate> | |||
</action> | |||
<action id="in.teejeetech.pkexec.timeshift"> | |||
<message gettext-domain="timeshift">Authentication is required to run Timeshift as Administrator</message> | |||
<description>Run Timeshift as Administrator</description> | |||
<icon_name>timeshift</icon_name> | |||
<defaults> | |||
<allow_any>auth_admin</allow_any> | |||
<allow_inactive>auth_admin</allow_inactive> | |||
<allow_active>auth_admin</allow_active> | |||
</defaults> | |||
<annotate key="org.freedesktop.policykit.exec.path">/<TimeShiftのインストールディレクトリ>/bin/timeshift</annotate> | |||
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate> | |||
</action> | |||
</policyconfig> | |||
</syntaxhighlight> | |||
<br> | |||
もし、TimeShiftをローカライズする場合は、moファイルを/usr/share/locale/<国名>/LC_MESSAGESディレクトリに保存する。 | |||
sudo cp /<TimeShiftのインストールディレクトリ>/share/locale/<国名>/LC_MESSAGES/timeshift.mo \ | |||
/usr/share/locale/<国名>/LC_MESSAGES | |||
<br> | |||
最後に、TimeShiftのデスクトップエントリファイルを作成する。<br> | |||
vi ~/.local/share/applications/timeshift-gtk.desktop | |||
<br> | |||
<syntaxhighlight lang="ini"> | |||
# ~/.local/share/applications/timeshift-gtk.desktopファイル | |||
[Desktop Entry] | |||
Type=Application | |||
Name=Timeshift | |||
GenericName=System Restore Utility | |||
GenericName[ja]=システムの復元ユーティリティ | |||
Comment=System Restore Utility | |||
Comment[ja]=システムの復元ユーティリティ | |||
Exec=/<TimeShiftのインストールディレクトリ>/bin/timeshift-launcher | |||
Icon=/<TimeShiftのインストールディレクトリ>/share/icons/hicolor/128x128/apps/timeshift.png | |||
Categories=System; | |||
MimeType= | |||
Terminal=false | |||
X-KDE-StartupNotify=false | |||
X-GNOME-UsesNotifications=true | |||
</syntaxhighlight> | |||
<br> | |||
===== 任意のディレクトリにインストールしたTimeShiftのアンインストール ===== | |||
TimeShiftをアンインストールする場合は、以下に従う。<br> | |||
cd <TimeShiftのソースコードがあるディレクトリ> | |||
sudo make uninstall | |||
<br> | |||
残存する不要なファイルを削除する。<br> | |||
rm -r ~/.local/share/applications/timeshift-gtk.desktop | |||
sudo rm -r /etc/timeshift | |||
sudo rm -r /usr/share/polkit-1/actions/in.teejeetech.pkexec.timeshift.policy | |||
find /usr/share/locale -type f -name "timeshift.mo" | sudo xargs rm | |||
<br> | |||
==== TimeShiftの日本語化 ==== | ==== TimeShiftの日本語化 ==== | ||
# [https://software.opensuse.org/download/package?package=timeshift&project=home%3Azzndb SUSEのソフトウェアセンター]にアクセスして、<u><span style="color:#C00000;">Leap向け</span></u>を選択して、x86_64のRPMファイルをダウンロードする。<br><u>TimeShiftのバージョンが異なる場合でも、ほとんどが日本語化される。</u> | # [https://software.opensuse.org/download/package?package=timeshift&project=home%3Azzndb SUSEのソフトウェアセンター]にアクセスして、<u><span style="color:#C00000;">Leap向け</span></u>を選択して、x86_64のRPMファイルをダウンロードする。<br><u>TimeShiftのバージョンが異なる場合でも、ほとんどが日本語化される。</u> | ||
| 94行目: | 253行目: | ||
__FORCETOC__ | __FORCETOC__ | ||
[[カテゴリ: | [[カテゴリ:RHEL]][[カテゴリ:SUSE]] | ||