You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To me it was not clear how I had to install and setup sanoid, so let me share what I did and you are welcome to discuss.
Install sanoid by apt
Install prerequisite software: apt install debhelper libcapture-tiny-perl libconfig-inifiles-perl pv lzop mbuffer build-essential
This lead to an error for me, I had to do: sudo apt-get install libc6=2.35-0ubuntu3
It seems a problem with apt lists for ubuntu 22 (Jammy). Might work with 20 without that line.
Clone this repo, build the debian package and install it (alternatively you can skip the package and do it manually like described below for CentOS):
Download the repo as root to avoid changing permissions later sudo git clone https://github.com/jimsalterjrs/sanoid.git cd sanoid
checkout latest stable release or stay on master for bleeding edge stuff (but expect bugs!)
Edit the configuration
Make a sanoid folder under /etc by mkdir /etc/sanoid/
Edit the configuration. You can use this as an example: /usr/share/doc/sanoid/examples/sanoid.conf
Make some cron jobs: crontab -e
and add these lines:
*/15 * * * * root flock -n /var/run/sanoid/cron-take.lock -c "TZ=UTC sanoid --take-snapshots"
*/15 * * * * root flock -n /var/run/sanoid/cron-prune.lock -c "sanoid --prune-snapshots"
Make a zfs pool on external disk.
// I have to edit this later
Sync the local snapshots to external drive by syncoid -r rpool backup-sam15tb
The text was updated successfully, but these errors were encountered:
backupandforkacc
changed the title
[Docu] Full instructions to setup zfs backups for ubuntu jammy 22 (backup to external disk) with sanoid/sycoid
[Docu] Full instructions to setup zfs backups for ubuntu jammy 22 (backup to external disk) with sanoid/syncoid
Feb 9, 2023
Make some cron jobs: crontab -e
and add these lines:
*/15 * * * * root flock -n /var/run/sanoid/cron-take.lock -c "TZ=UTC sanoid --take-snapshots"
*/15 * * * * root flock -n /var/run/sanoid/cron-prune.lock -c "sanoid --prune-snapshots"
FYI, I think that 'system timers' and 'crontab' are mutually exclusive. You should really only have system timers (preferred) OR crontab jobs, otherwise things get a little confused with zfs. Not even sure why you are doing 'flock' every 15 mins in crontab, if it is something necessary, you could just do it in the 'system timer' too.
To me it was not clear how I had to install and setup sanoid, so let me share what I did and you are welcome to discuss.
Install prerequisite software:
apt install debhelper libcapture-tiny-perl libconfig-inifiles-perl pv lzop mbuffer build-essential
This lead to an error for me, I had to do:
sudo apt-get install libc6=2.35-0ubuntu3
It seems a problem with apt lists for ubuntu 22 (Jammy). Might work with 20 without that line.
Clone this repo, build the debian package and install it (alternatively you can skip the package and do it manually like described below for CentOS):
Download the repo as root to avoid changing permissions later
sudo git clone https://github.com/jimsalterjrs/sanoid.git
cd sanoid
checkout latest stable release or stay on master for bleeding edge stuff (but expect bugs!)
Enable sanoid timer:
enable and start the sanoid timer
Edit the configuration
Make a sanoid folder under /etc by
mkdir /etc/sanoid/
Edit the configuration. You can use this as an example:
/usr/share/doc/sanoid/examples/sanoid.conf
Make some cron jobs:
crontab -e
and add these lines:
*/15 * * * * root flock -n /var/run/sanoid/cron-take.lock -c "TZ=UTC sanoid --take-snapshots"
*/15 * * * * root flock -n /var/run/sanoid/cron-prune.lock -c "sanoid --prune-snapshots"
Make a zfs pool on external disk.
// I have to edit this later
Sync the local snapshots to external drive by
syncoid -r rpool backup-sam15tb
The text was updated successfully, but these errors were encountered: