Last night I created an executable file in /root called "zfsbackup". The contents of this file was as follows:
When running this file manually all was fine. When running it via cron manually it was fine. But when it ran as scheduled early this morning it caused my server to crash (panic?) and I had to reboot.
Questions:
1) How can I see the errors that were on the console screen this morning so I can troubleshoot?
2) Why is this backup script causing the server to crash?
I'm running FreeBSD 9.0 RELEASE i386 with 4GB RAM.
My /boot/loader.conf has the following ZFS options set:
All my ZFS pool are encrypted with GELI except /boot.
Code:
#!/bin/sh
zfs snapshot -r bootdir@`date +%d.%m.%Y`-bootdir
zfs send -Rv bootdir@`date +%d.%m.%Y`-bootdir | gzip > /backups/bootdir/`date +%d.%m.%Y`-bootdir.zfs.gz
zfs destroy -r bootdir@`date +%d.%m.%Y`-bootdir
zfs snapshot -r zroot@`date +%d.%m.%Y`-zroot
zfs send -Rv zroot@`date +%d.%m.%Y`-zroot | gzip > /backups/zroot/`date +%d.%m.%Y`-zroot.zfs.gz
zfs destroy -r zroot@`date +%d.%m.%Y`-zroot
cd /backups; find . -type f -mtime +60d -delete;
When running this file manually all was fine. When running it via cron manually it was fine. But when it ran as scheduled early this morning it caused my server to crash (panic?) and I had to reboot.
Questions:
1) How can I see the errors that were on the console screen this morning so I can troubleshoot?
2) Why is this backup script causing the server to crash?
I'm running FreeBSD 9.0 RELEASE i386 with 4GB RAM.
My /boot/loader.conf has the following ZFS options set:
Code:
vfs.zfs.prefetch_disable="1"
vfs.root.mountfrom="zfs:zroot"
zfs_load="YES"
vm.kmem_size="512M"
vm.kmem_size_max="512M"
All my ZFS pool are encrypted with GELI except /boot.