anleitungen:vu:aufnahmen_von_interner_hdd_verschieben
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| anleitungen:vu:aufnahmen_von_interner_hdd_verschieben [2018/05/21 08:16] – angelegt dokuwikiadmin | anleitungen:vu:aufnahmen_von_interner_hdd_verschieben [2026/11/01 00:47] (aktuell) – gelöscht - Externe Bearbeitung (Unbekanntes Datum) 127.0.0.1 | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | ====== Aufnahmen von interner HDD verschieben ====== | ||
| - | Wenn die Festplatte zu klein wird können mit diesem Skript die Aufnahmen z.B. auf ein NAS verschoben werden. | ||
| - | < | ||
| - | #!/bin/bash | ||
| - | ############################################################################################################################################ | ||
| - | # This script is designed for Vu+ sat receivers with VTI image. | ||
| - | # The idea is to " | ||
| - | # It is possible make recordings directly to the NAS. | ||
| - | # But in case of no availability or heavy network or NAS load the quality of recordings might be bad. | ||
| - | # So the recordings are always local and will be " | ||
| - | # The NAS is connected with NFS to the receiver. | ||
| - | # I decided to use the copy command instead of the move command as I recognised data loss (maybe because of protected .ts and .eit files). | ||
| - | # After the copy command I check if the .ts file is existing (the other files are not so important) before I delete the source files. | ||
| - | # Recordings that are marked for deletion are ignored. | ||
| - | # | ||
| - | # Author: R. Wudernitz | ||
| - | # Date: 2018-03-11, 2018-03-19 | ||
| - | # | ||
| - | # Please note: I am no programmer. I created this script with help of DuckDuckGo and by try and error. USE IT AT YOUR OWN RISK !!! | ||
| - | ############################################################################################################################################ | ||
| - | |||
| - | |||
| - | ##### make your changes here according to your setup | ||
| - | foldersource="/ | ||
| - | folderdest="/ | ||
| - | age=1 # | ||
| - | |||
| - | |||
| - | ################## | ||
| - | if [ -d " | ||
| - | for filets in $foldersource*.ts ; do # search for ts files | ||
| - | fname=$(basename " | ||
| - | if ! [ -f " | ||
| - | fdate=${fname%%\ *} # get the recording date from the file name | ||
| - | cdate=$(date " | ||
| - | ddif=$(($cdate - $fdate)) # | ||
| - | |||
| - | if [ $ddif -gt $age ]; then # | ||
| - | copyf=${filets%.*} # | ||
| - | if [ -d " | ||
| - | cp " | ||
| - | if [ -f " | ||
| - | rm " | ||
| - | fi | ||
| - | fi | ||
| - | fi | ||
| - | fi | ||
| - | done | ||
| - | fi | ||
| - | </ | ||
