「インストール - バックアップ」の版間の差分
62行目: | 62行目: | ||
make app-console -j $(nproc) | make app-console -j $(nproc) | ||
make app-gtk -j $(nproc) | make app-gtk -j $(nproc) | ||
make DESTDIR=<TimeShiftのインストールディレクトリ> install | |||
sudo cp -r /<TimeShiftのインストールディレクトリ>/etc/timeshift /etc | |||
# または | |||
sudo make install | sudo make install | ||
# 不要なビルドファイルを削除する | # 不要なビルドファイルを削除する | ||
make clean | make clean | ||
<br> | |||
任意のディレクトリにインストールした場合、TimeShiftのPolkitアクションを作成する。<br> | |||
sudo vi /usr/share/polkit-1/actions/in.teejeetech.pkexec.timeshift.policy | |||
<br> | |||
<syntaxhighlight lang="xml"> | |||
# /usr/share/polkit-1/actions/in.teejeetech.pkexec.timeshift.policyファイル | |||
<?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のインストールディレクトリ>/usr/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のインストールディレクトリ>/usr/bin/timeshift</annotate> | |||
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate> | |||
</action> | |||
</policyconfig> | |||
</syntaxhighlight> | |||
<br> | <br> | ||
TimeShiftをアンインストールする。<br> | TimeShiftをアンインストールする。<br> |
2023年3月23日 (木) 14:48時点における版
概要
Linuxデスクトップやワークステーションでは、優れたバックアップソフトウェアがある。
その中でも、インストールが簡単かつユーザが必要とする機能を最大限にサポートしていると思われるソフトウェアを記載する。
バックアップソフトウェアを使用する場合、自動バックアップ(毎時、毎日、毎週、毎月等)やクラウドやローカルストレージへの自動同期バックアップ、
一定期間以上古いバックアップの削除などに対応したバックアップソフトウェアが好ましい。
大容量のバックアップファイルをクラウドストレージに同期するための高速なインターネット接続環境が無い場合は、
外部ストレージを使用してバックアップを保存することを推奨する。
TimeShift
概要
Timeshiftのセットアップウィザードでは、バックアップを実行するために必要な全ての設定を行う。
スナップショットの保存場所、バックアップを実行する時間、保存するスナップショットの数、バックアップするディレクトリやパーティション等を設定する。
ただし、Timeshiftは、スナップショットを外部ストレージに保存することはできるが(Rrsyncタイプのみ)、クラウドストレージに自動的に転送することはできない。
Btrfsをサポートしているため、スナップショットのタイプをRSYNCまたはBtrfsから選択できる。
これは、LinuxのファイルシステムがBtrfsであればBtrfs、そうでなければRsyncを選択する。
- Btrfsタイプ
- スナップショット作成時にファイルのコピーや削除を行わない。
- まず、スナップショットを0サイズで初期化する。
- ユーザがシステムにファイルを追加する時、ファイルのデータはブロックに格納されて、スナップショット内のファイルはデータブロックを指し示す。
- そのため、データをコピーするのではなく、データブロックを指すリンクを作成する。
- Rsyncタイプよりも高速であり、バックアップ作成中にデータが失われる心配もない。
- ただし、Btrfsタイプのデメリットは、外付けストレージにバックアップを保存できないことである。
- つまり、現在のドライブが故障すると、全てのバックアップも失われてしまう。
- Rsyncタイプ
- ファイルをコピーしてスナップショットを作成して、外部ストレージにスナップショットを保存することができる。
- もし、システムドライブが故障しても、スナップショットにバックアップされたデータは安全に保たれる。
CentOS
TimeShiftをインストールする。
sudo yum install timeshift
SUSE
リポジトリを追加してインストール
SUSEにおいて、標準のパッケージ管理システムにはTimeShiftが存在しないため、リポジトリを追加してインストールする必要がある。
SUSEのソフトウェアセンターにアクセスして、SUSEのバージョンに合ったTimeShiftをインストールする。
または、以下のコマンドを実行して、TimeShiftをインストールする。
sudo zypper addrepo https://download.opensuse.org/repositories/home:Lord-Master/openSUSE_Leap_xx.x/home:Lord-Master.repo sudo zypper refresh sudo zypper install timeshift
ソースコードからインストール
TimeShiftのビルドに必要なライブラリをインストールする。
sudo zypper install gtk3-devel libgee-devel typelib-1_0-Gee-1_0 json-glib-devel vala libvala-0_54-0 libvala-0_54-devel vte-devel
TimeShiftのGithubにアクセスして、TimeShiftのソースコードをダウンロードする。
ダウンロードしたファイルを解凍する。
tar xf timeshift-<バージョン>.tar.gz cd timeshift-<バージョン>
または、git clone
コマンドを実行して、ソースコードをダウンロードする。
git clone https://github.com/teejee2008/timeshift.git cd timeshift
TimeShiftをビルドおよびインストールする。
make app-console -j $(nproc) make app-gtk -j $(nproc) make DESTDIR=<TimeShiftのインストールディレクトリ> install sudo cp -r /<TimeShiftのインストールディレクトリ>/etc/timeshift /etc # または sudo make install # 不要なビルドファイルを削除する make clean
任意のディレクトリにインストールした場合、TimeShiftのPolkitアクションを作成する。
sudo vi /usr/share/polkit-1/actions/in.teejeetech.pkexec.timeshift.policy
# /usr/share/polkit-1/actions/in.teejeetech.pkexec.timeshift.policyファイル
<?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のインストールディレクトリ>/usr/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のインストールディレクトリ>/usr/bin/timeshift</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>
TimeShiftをアンインストールする。
cd <TimeShiftのソースコードがあるディレクトリ> sudo make uninstall # 残存する不要なファイルを削除する sudo rm -r /etc/timeshift sudo rm -r /usr/share/pixmaps/timeshift.png
Grsync
概要
Grsyncは、Rsyncを使用するためのシンプルなインターフェースである。
CentOS / SUSE
SourceforgeのWebサイトにアクセスして、Grsyncのソースコードをダウンロードする。
ダウンロードしたファイルを解凍して、ビルド向けディレクトリを作成する。
tar xf grsync-x.x.x.tar.gz cd grsync-x.x.x && mkdir build && cd build
Grsyncのビルドに必要な依存関係のライブラリをインストールする。
# CentOS sudo yum install gtk3-devel # SUSE sudo zypper install gtk3-devel wayland-devel wayland-protocols-devel intltool
Grsyncをビルドおよびインストールする。
../configure --prefix=<Grsyncのインストールディレクトリ> make -j $(nproc) make install