rsyncを使用して、Ubuntu インストールのホーム ディレクトリ (ext4) をバックアップします。次のコマンドを使用して、ファイルとフォルダーをリモート サーバー (ext4) にコピーします。
$ rsync -rt --delete --delete-excluded --links \
--exclude-from '/home/jjd/rsync-home-exclude.txt' \
/home/jjd/ server:/volume1/backup-home
バックアップでは無視できるフォルダーとファイルをいくつか定義しました。
$ cat /home/jjd/rsync-home-exclude.txt
/home/jjd/.thumbnails/
/home/jjd/Downloads/.org.chromium.Chromium*
/home/jjd/.cpan
.cache/
*.swp
*.lock
*.tmp
/home/jjd/.local/share/recently-used.*
.TrueCrypt/.show-request-queue
.dropbox/command_socket
.dropbox/iface_socket
*.sock%
それにもかかわらず、rsyncは引き続き次のエラーを報告します。
rsync: opendir "/home/jjd/.cpan/build/local-lib-1.008009-Xl6GGK/inc" failed: Permission denied (13)
rsync: opendir "/home/jjd/.cpan/build/local-lib-1.008009-Xl6GGK/lib" failed: Permission denied (13)
rsync: opendir "/home/jjd/.cpan/build/local-lib-1.008009-Xl6GGK/t" failed: Permission denied (13)
IO error encountered -- skipping file deletion
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1070) [sender=3.0.9]