scripts

Random scripts
git clone git://git.margiolis.net/scripts.git
Log | Files | Refs | README | LICENSE

commit ba93d8a63ade74990ee3d0ca523eefc260f9ce99
parent 96bb945ae6cf1597aa3ba65e9a47309cdd748ea1
Author: Christos Margiolis <christos@margiolis.net>
Date:   Mon,  4 Apr 2022 02:08:37 +0300

minor fixes

Diffstat:
Mbackup | 6+++---
Mscreencast | 1-
2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/backup b/backup @@ -32,7 +32,7 @@ delete_existing_snap() local last_snap=${2} if [ "${last_snap}" = "${new_snap}" ]; then - test ${f_snap} -eq 1 || err "snapshot ${new_snap} exists already" + test ${f_snap} -eq 1 || err "snapshot ${pool}@${new_snap} exists already" zfs destroy -r ${pool}@${new_snap} fi } @@ -66,10 +66,10 @@ delete_existing_snap "${src_pool}" "${src_last_snap}" zfs snapshot -r ${src_pool}@${new_snap} # Make sure dst has more than 1 snapshots before we delete anything. -test ${nsnaps} -le 1 || delete_existing_snap "${dst_pool}" "${dst_last_snap}" +#test ${nsnaps} -le 1 || delete_existing_snap "${dst_pool}" "${dst_last_snap}" if [ ${f_incr} -eq 1 ]; then - zfs send -RI ${src_pool}@${last_snap} ${src_pool}@${new_snap} | pv | zfs recv -Fu ${dst_pool} + zfs send -RI ${src_pool}@${dst_last_snap} ${src_pool}@${new_snap} | pv | zfs recv -Fu ${dst_pool} else zfs send -R ${src_pool}@${new_snap} | pv | zfs recv -Fu ${dst_pool} fi diff --git a/screencast b/screencast @@ -5,4 +5,3 @@ ffmpeg -y \ -s $(xrandr | grep "connected primary" | awk '{print $4}' | sed 's/+0+0//') \ -i :0.0 \ -c:v libx264 -r 30 -c:a mp3 ${1} - #-f oss -i default \