
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Various scripts for administrating ZFS. Modeled after time-sliderd and ZFS Automatic Snapshots from OpenSolaris
Install the gem.
gem install zfstools
rake install
Setup crontab entries for scripts wanted. See below.
This will handle automatically snapshotting datasets similar to time-sliderd from OpenSolaris. Setup allows you to define your own intervals, snapshot names, and how many to keep for each interval. Zero-sized snapshots will automatically be cleaned up.
/usr/local/bin/zfs-auto-snapshot INTERVAL KEEP
frequent
, hourly
, daily
, weekly
, monthly
, etc.15,30,45 * * * * root /usr/local/bin/zfs-auto-snapshot frequent 4
0 * * * * root /usr/local/bin/zfs-auto-snapshot hourly 24
7 0 * * * root /usr/local/bin/zfs-auto-snapshot daily 7
14 0 * * 7 root /usr/local/bin/zfs-auto-snapshot weekly 4
28 0 1 * * root /usr/local/bin/zfs-auto-snapshot monthly 12
Only datasets with the com.sun:auto-snapshot
property set to true
will be snapshotted.
zfs set com.sun:auto-snapshot=true DATASET
Setting a MySQL dataset's property to mysql
will hook it into the zfs-snapshot-mysql
script. See its section for setup instructions.
zfs set com.sun:auto-snapshot=mysql DATASET
Setting a PostgreSQL dataset's property to postgresql
will cause zfs-auto-snapshot to put postgresql in online backup mode for the snapshot.
zfs set com.sun:auto-snapshot=postgresql DATASET
The user executing zfs-auto-snapshot
will require passwordless login to the postgres
database and will require either REPLICATION or SUPERUSER privileges. The easiest approach is to set up a trust or ident record in your pg_hba.conf. The zfs-auto-snapshot
script will execute pg_start_backup() prior to saving the snapshot and execute pg_stop_backup() afterwards.
You can override a child dataset to use, or not use auto snapshotting by settings its flag with the given interval.
zfs set com.sun:auto-snapshot:weekly=false DATASET
Snapshots a mysql server's databases. This requires that mysql's datadir
/innodb_data_home_dir
/innodb_log_group_home_dir
be a ZFS dataset.
tank/db/mysql
tank/db/mysql/bin-log
tank/db/mysql/data
tank/db/mysql/innodb
tank/db/mysql/innodb/data
tank/db/mysql/innodb/log
These settings should be set before importing any data.
zfs set primarycache=metadata tank/db/mysql/innodb
zfs set recordsize=16K tank/db/mysql/innodb/data
zfs set recordsize=8K tank/db/mysql/data
zfs set compression=lzjb tank/db/mysql/data
innodb_data_home_dir = /tank/db/mysql/innodb/data
innodb_log_group_home_dir = /tank/db/mysql/innodb/log
datadir = /tank/db/mysql/data
log-bin = /tank/db/mysql/bin-log/mysql-bin
Setup a /root/.my.cnf
with the relevant information on where to connect to, with the proper username/password that has access to FLUSH LOGS
and FLUSH TABLES WITH READ LOCK
.
The zfs-auto-snapshot
script will automatically flush the tables before saving the snapshots.
Cleans up zero-sized snapshots. This ignores snapshots created by zfs-auto-snapshot
as it handles zero-sized in its own special way.
*/20 * * * * /usr/local/bin/zfs-cleanup-snapshots
FAQs
Unknown package
We found that zfstools demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.