Size: 2475
Comment:
|
Size: 2740
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 3: | Line 3: |
== Policy == === Target === List of directories to obtain the backup. * k1boot * /opt * /diskless/root * k1nfs0 * /export/apps * /export/ligo * /export/kagra * /export/users === Method === * k1boot * backup to k1bck0 by using borg * k1nfs0 * backup to k1bck0 by using borg * backup to local HDD by using rsync |
|
Line 7: | Line 28: |
# borg create --progress -s /zbackup/apps::20181017 /export/apps/ # borg create --progress -s /zbackup/kagra::20181017 /export/kagra/ # borg create --progress -s /zbackup/ligo::20181018 /export/ligo/ # borg create --progress -s /zbackup/opt::20181018 /export/opt/ # borg create --progress -s /zbackup/users::20181018 /export/users/ |
# borg init -e none /BACKUP_DIR |
Line 13: | Line 30: |
=== Backup from source directory === {{{ # borg create /BACKUP_DIR::ARCHIVE /SRC }}} ARCHIVE is name of archive in this time. |
|
Line 66: | Line 89: |
k1boot:/diskless/root /export/root nfs ro,noauto 0 0 |
Backup System
Contents
Policy
Target
List of directories to obtain the backup.
- k1boot
- /opt
- /diskless/root
- k1nfs0
- /export/apps
- /export/ligo
- /export/kagra
- /export/users
Method
- k1boot
- backup to k1bck0 by using borg
- k1nfs0
- backup to k1bck0 by using borg
- backup to local HDD by using rsync
How to backup
Initialization
# borg init -e none /BACKUP_DIR
Backup from source directory
# borg create /BACKUP_DIR::ARCHIVE /SRC
ARCHIVE is name of archive in this time.
Daily
- Once a day the script is executed by cron.
- The script is located at /root/bin/backup_borg.sh
Policy of prune backup
- Keep the last seven days of backups
- Keep the latest backup on each week, up to 4
Maintenance
OS update
# freebsd-update fetch # freebsd-update install # pkg upgrade # reboot
Installation
- Install FreeBSD 11
- Install packages
# pkg install tmux py36-borgbackup
- Configuration
- SSH
/etc/rc/conf sshd_enable="YES"
NFS & autofs
/etc/rc.local nfs_client_enable="YES" autofs_enable="YES"
/etc/auto_master /- -noauto
/etc/fstab # NFS k1nfs0:/export/users /export/users nfs ro,noauto 0 0 k1nfs0:/export/ligo /export/ligo nfs ro,noauto 0 0 k1nfs0:/export/apps /export/apps nfs ro,noauto 0 0 k1nfs0:/export/kagra /export/kagra nfs ro,noauto 0 0 k1boot:/opt /export/opt nfs ro,noauto 0 0 k1boot:/diskless/root /export/root nfs ro,noauto 0 0
- SSH
- Create RAID
# zpool create zbackup raidz2 ada1 ada2 ada3 da0 da1 # zpool status pool: zbackup state: ONLINE scan: none requested config: NAME STATE READ WRITE CKSUM zbackup ONLINE 0 0 0 raidz2-0 ONLINE 0 0 0 ada1 ONLINE 0 0 0 ada2 ONLINE 0 0 0 ada3 ONLINE 0 0 0 da0 ONLINE 0 0 0 da1 ONLINE 0 0 0 errors: No known data errors
- Reboot
# reboot
HDD list
device |
Serial |
for |
|
|
|
ada0 |
|
system |
ada1 |
1SHW665Z |
data |
ada2 |
1SHM8GSZ |
|
ada3 |
1SHX5YDZ |
|
da0 |
1SHWVU4Z |
|
da1 |
1SHWE8JZ |