...
This commit is contained in:
29
backupmac.sh
29
backupmac.sh
@@ -1,31 +1,33 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
REPOSITORY=pi@pi4:/media/hdext/borg
|
||||||
#REPOSITORY=marc@nas:/dat/bak/borg_mac
|
#REPOSITORY=marc@nas:/dat/bak/borg_mac
|
||||||
REPOSITORY=pi@kodi:/media/hdext/borg
|
#REPOSITORY=pi@kodi:/media/hdext/borg
|
||||||
|
#REPOSITORY=marc@vdr.fritz.box:/media/hdext/borg
|
||||||
#REPOSITORY=/Volumes/nifty/bak/borg
|
#REPOSITORY=/Volumes/nifty/bak/borg
|
||||||
|
|
||||||
|
|
||||||
borg create -v --stats --progress --compression zlib --one-file-system \
|
borg create -v --stats --progress --compression zlib --one-file-system \
|
||||||
$REPOSITORY::'{hostname}-{now:%Y-%m-%d}' \
|
$REPOSITORY::'{hostname}-{now:%Y-%m-%d}' \
|
||||||
/ \
|
/System/Volumes/Data \
|
||||||
/Volumes/Data \
|
|
||||||
--exclude '*/tmp/*' \
|
--exclude '*/tmp/*' \
|
||||||
--exclude '*/tmpfile/*' \
|
--exclude '*/tmpfile/*' \
|
||||||
--exclude '*/Temp/*' \
|
--exclude '*/Temp/*' \
|
||||||
--exclude '/var/tmp/*' \
|
--exclude '*/var/tmp/*' \
|
||||||
--exclude '/var/crash/*' \
|
--exclude '*/var/crash/*' \
|
||||||
--exclude '*/.cache/*' \
|
--exclude '*/.cache/*' \
|
||||||
--exclude '*/cache/*' \
|
--exclude '*/cache/*' \
|
||||||
|
--exclude '*/Caches/*' \
|
||||||
--exclude '*/.ccache/*' \
|
--exclude '*/.ccache/*' \
|
||||||
--exclude '*/Caches/*' \
|
--exclude '*/Caches/*' \
|
||||||
--exclude '*/mlocate.db*' \
|
--exclude '*/mlocate.db*' \
|
||||||
--exclude '/run' \
|
--exclude '*/run' \
|
||||||
--exclude '/var/cache/apt/archives/*.deb' \
|
--exclude '*/var/cache/apt/archives/*.deb' \
|
||||||
--exclude '/var/cache/man' \
|
--exclude '*/var/cache/man' \
|
||||||
--exclude '/private/var' \
|
--exclude '*/private/var' \
|
||||||
--exclude '/tmp' \
|
--exclude '/tmp' \
|
||||||
--exclude '/var/tmp' \
|
--exclude '*/var/tmp' \
|
||||||
--exclude '/Users/marc/tmp' \
|
--exclude '*/Users/marc/tmp' \
|
||||||
--exclude '/Users/marc/Downloads' \
|
--exclude '*/Downloads/*' \
|
||||||
--exclude '*/Caches/*' \
|
--exclude '*/Caches/*' \
|
||||||
--exclude '*/.Trash/*' \
|
--exclude '*/.Trash/*' \
|
||||||
--exclude '*/.Spotlight-*' \
|
--exclude '*/.Spotlight-*' \
|
||||||
@@ -33,8 +35,9 @@ borg create -v --stats --progress --compression zlib --one-file-system \
|
|||||||
--exclude '*/ot_shared_cache' \
|
--exclude '*/ot_shared_cache' \
|
||||||
--exclude '*/dyld_shared_cache*' \
|
--exclude '*/dyld_shared_cache*' \
|
||||||
--exclude '*/Downloads/*' \
|
--exclude '*/Downloads/*' \
|
||||||
|
--exclude '/System/Volumes/Data/Applications/Xcode.app/*' \
|
||||||
|
|
||||||
Use the `prune` subcommand to maintain 7 daily, 4 weekly and 6 monthly
|
# Use the `prune` subcommand to maintain 7 daily, 4 weekly and 6 monthly
|
||||||
# archives of THIS machine. The '{hostname}-' prefix is very important to
|
# archives of THIS machine. The '{hostname}-' prefix is very important to
|
||||||
# limit prune's operation to this machine's archives and not apply to
|
# limit prune's operation to this machine's archives and not apply to
|
||||||
# other machine's archives also.
|
# other machine's archives also.
|
||||||
|
|||||||
16
fvl
16
fvl
@@ -1,15 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
videodir=/dat/video/vdr
|
|
||||||
vdrdb=/tmp/vdr.db
|
|
||||||
|
|
||||||
tofind=$1
|
tofind=$1
|
||||||
|
|
||||||
files=$(locate -d $vdrdb -i $1 | grep -v .rec)
|
cmd2nas=~/bin/cmd2nas.sh
|
||||||
|
|
||||||
|
ls -l ~/bin/cmd2nas.sh
|
||||||
|
|
||||||
|
$cmd2nas "/home/marc/bin/fvl '*$tofind*'"
|
||||||
|
|
||||||
|
|
||||||
for f in $files; do
|
|
||||||
if [ -d $f ]; then
|
|
||||||
#echo $f
|
|
||||||
du -sh $f
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
|
srcdir=$1
|
||||||
srcdir=/dat/audio/auto
|
dstdir=$2
|
||||||
# sudo mount -o uid=marc /dev/sdt1 /media/hdext
|
# sudo mount -o uid=marc /dev/sdt1 /media/hdext
|
||||||
rsync -a --no-o --no-p --no-g -L --modify-window 1 --stats --delete --progress $srcdir /media/hdext/
|
rsync -a --no-o --no-p --no-g -L --modify-window 1 --stats --delete --progress $srcdir $dstdir
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user