Instantly share code, notes, and snippets.

View gist:acad070b2d47c7f7d65654eaad5d1954
*update slot storage=bacula-sd-02
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
Enter autochanger drive[0]:
Connecting to Storage daemon bacula-sd-02 at bacula-sd-02.int.unixathome.org:9103 ...
3306 Issuing autochanger "slots" command.
Device "bacula-sd-02" has 47 slots.
Connecting to Storage daemon bacula-sd-02 at bacula-sd-02.int.unixathome.org:9103 ...
3306 Issuing autochanger "list" command.
Catalog record for Volume "000046L4" is up to date.
View gist:3b1e15161f56d3577e010dc77ff71846
poudriere testport output:
=>> Checking for extra files and directories
=>> Error: Files or directories modified:
%%FP_DATADIR%%/cache/daily user (10001, 80) permissions (0755, 0775)
%%FP_DATADIR%%/cache/news permissions (0755, 0775)
From a testport -i shell:
root@120amd64-default-master-list:~freshports/cache # ls -ld
View grant-rsyncer-permissions.sh
#!/bin/sh
# these permissions only need to be run once, and then it allows rsyncer to backup the databases
SCHEMAS="auth base conflict custom log momomoto public release"
DATABASES="pentabarf_bsdcan pentabarf_pgcon"
for schema in ${SCHEMAS}
do
for database in ${DATABASES}
View after the scrub
[dan@slocum:~] $ for disk in `sysctl -n kern.disks`; do sudo diskinfo -t $disk ; done
da9
512 # sectorsize
32017047552 # mediasize in bytes (30G)
62533296 # mediasize in sectors
0 # stripesize
0 # stripeoffset
3892 # Cylinders according to firmware.
255 # Heads according to firmware.
63 # Sectors according to firmware.
View distkinfo -t
[dan@slocum:~] $ for disk in `sysctl -n kern.disks`; do sudo diskinfo -t $disk ; done
da9
512 # sectorsize
32017047552 # mediasize in bytes (30G)
62533296 # mediasize in sectors
0 # stripesize
0 # stripeoffset
3892 # Cylinders according to firmware.
255 # Heads according to firmware.
63 # Sectors according to firmware.
View ps auwwx | grep svn
[dan@dev-ingress01:/usr/local/libexec/freshports] $ ls -l /var/db/freshports/ports-jail/var/db/repos
total 69
drwxr-xr-x 70 freshports freshports 83 Jun 10 2018 PORTS-2018Q1
drwxr-xr-x 70 freshports freshports 84 Apr 29 2018 PORTS-2018Q2
drwxr-xr-x 70 freshports freshports 85 Sep 25 15:57 PORTS-2018Q3
drwxr-xr-x 70 freshports freshports 85 Oct 1 10:31 PORTS-2018Q4
drwxr-xr-x 4 freshports freshports 4 Jan 2 16:01 PORTS-2019Q1
drwxr-xr-x 70 freshports freshports 85 Jan 2 03:07 PORTS-2019Q1.original
drwxr-xr-x 70 freshports freshports 85 Jan 2 10:48 PORTS-2019Q1.original.2
drwxr-xr-x 70 freshports freshports 85 Jan 2 11:15 PORTS-2019Q1.original.3
View 1 - Create a 70G file:
[dan@slocum:~] $ sudo touch /tank_fast/zrootd
[dan@slocum:~] $ sudo dd if=/dev/zero of=/tank_fast/zrootd bs=1k count=1 seek=70M
1+0 records in
1+0 records out
1024 bytes transferred in 0.000138 secs (7420666 bytes/sec)
# wow, no time at all
[dan@slocum:~] $ ls -l /tank_fast/
View canmount
[dan@slocum:~] $ zfs get -r -t filesystem canmount system/bootenv
NAME PROPERTY VALUE SOURCE
system/bootenv canmount on default
system/bootenv/11.1-RELEASE canmount off local
system/bootenv/11.1-RELEASE/tmp canmount off local
system/bootenv/11.1-RELEASE/usr canmount off local
system/bootenv/11.1-RELEASE/usr/local canmount off local
system/bootenv/11.1-RELEASE/usr/obj canmount off local
system/bootenv/11.1-RELEASE/usr/src canmount off local
system/bootenv/11.1-RELEASE/var canmount off local
View beadm list
$ beadm list
BE Active Mountpoint Space Created
default - - 9.3G 2013-05-03 02:16
10.1-RELEASE - - 2.3G 2015-03-13 17:37
10.3-RELEASE NR / 55.9G 2016-07-26 23:19
11.1-RELEASE - - 1.4G 2018-07-31 22:41
11.2-RELEASE - - 776.0K 2018-12-11 19:08
[dan@slocum:~] $ uname -a
FreeBSD slocum.int.unixathome.org 12.0-RELEASE FreeBSD 12.0-RELEASE r341666 GENERIC amd64
View ouch, where are my backups?
[dan@dev-nginx01:~] $ cd /usr/local/www/
[dan@dev-nginx01:/usr/local/www] $ ls -l
total 50
drwxr-xr-x 3 dan dan 4 Dec 27 22:30 freshports
lrwxr-xr-x 1 root wheel 25 Apr 17 2018 nginx -> /usr/local/www/nginx-dist
dr-xr-xr-x 2 root wheel 5 Dec 27 22:54 nginx-dist
drwxr-xr-x 2 root wheel 2 Oct 25 02:14 phorum
[dan@dev-nginx01:/usr/local/www] $ cd freshports/
[dan@dev-nginx01:/usr/local/www/freshports] $ ls -lat
total 34