init
This commit is contained in:
13
error.log
Executable file
13
error.log
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
running: 2
|
||||||
|
rsync: symlink "/mnt/NASbarracuda1TB/backup/pi2/seafile/seafile-data" -> "/mnt/piseafile/seafile-data" failed: Operation not supported (95)
|
||||||
|
rsync: symlink "/mnt/NASbarracuda1TB/backup/pi2/seafile/seafile-server-latest" -> "seafile-server-7.1.4" failed: Operation not supported (95)
|
||||||
|
rsync: mknod "/mnt/NASbarracuda1TB/backup/pi2/seafile/ccnet/ccnet-rpc.sock" failed: Operation not permitted (1)
|
||||||
|
rsync: symlink "/mnt/NASbarracuda1TB/backup/pi2/seafile/seafile-data_bkp/seafile-data" -> "/mnt/piseafile/seafile-data/" failed: Operation not supported (95)
|
||||||
|
rsync: mknod "/mnt/NASbarracuda1TB/backup/pi2/seafile/seafile-server-7.1.4/runtime/seafile.sock" failed: Operation not permitted (1)
|
||||||
|
rsync: symlink "/mnt/NASbarracuda1TB/backup/pi2/seafile/seafile-server-7.1.4/seafile/lib/libccnet.so" -> "libccnet.so.0.0.0" failed: Operation not supported (95)
|
||||||
|
rsync: symlink "/mnt/NASbarracuda1TB/backup/pi2/seafile/seafile-server-7.1.4/seafile/lib/libccnet.so.0" -> "libccnet.so.0.0.0" failed: Operation not supported (95)
|
||||||
|
rsync: symlink "/mnt/NASbarracuda1TB/backup/pi2/seafile/seafile-server-7.1.4/seafile/lib/libsearpc.so" -> "libsearpc.so.1.0.2" failed: Operation not supported (95)
|
||||||
|
rsync: symlink "/mnt/NASbarracuda1TB/backup/pi2/seafile/seafile-server-7.1.4/seafile/lib/libsearpc.so.1" -> "libsearpc.so.1.0.2" failed: Operation not supported (95)
|
||||||
|
rsync: symlink "/mnt/NASbarracuda1TB/backup/pi2/seafile/seafile-server-7.1.4/seafile/lib/python3.6" -> "python3.7" failed: Operation not supported (95)
|
||||||
|
rsync: symlink "/mnt/NASbarracuda1TB/backup/pi2/seafile/seafile-server-7.1.4/seahub/media/avatars" -> "../../../seahub-data/avatars" failed: Operation not supported (95)
|
||||||
|
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1207) [sender=3.1.3]
|
||||||
36
pibackup.sh
Executable file
36
pibackup.sh
Executable file
@@ -0,0 +1,36 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# check if running
|
||||||
|
me="$(basename "$0")";
|
||||||
|
result=`ps aux | grep -i $me | grep -v "grep" | wc -l`
|
||||||
|
echo "running: $result"
|
||||||
|
if [ $result -gt 2 ]
|
||||||
|
then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
# delete
|
||||||
|
ROOTDIR=/home/pi/projects/pibackup
|
||||||
|
STATUSFILE=$ROOTDIR/status.log
|
||||||
|
ERRORFILE=$ROOTDIR/error.log
|
||||||
|
|
||||||
|
if [ -f "${STATUSFILE}" ]; then
|
||||||
|
sudo rm ${STATUSFILE}
|
||||||
|
fi
|
||||||
|
|
||||||
|
# DB
|
||||||
|
BACKUPDIR=/mnt/NASbarracuda1TB/backup/pi2/db/`date +"%Y-%m-%d-%H-%M-%S"`
|
||||||
|
mkdir -p ${BACKUPDIR}
|
||||||
|
for DB in $(mysql -e 'show databases' -s --skip-column-names -u pi2 -p13371337); do
|
||||||
|
mysqldump --single-transaction -h localhost -u pi2 -p13371337 --opt $DB > ${BACKUPDIR}/$DB.sql
|
||||||
|
done
|
||||||
|
|
||||||
|
# seafile
|
||||||
|
sudo rsync -azh --log-file=${ROOTDIR}/status.log --exclude={'seafile-data','seafile-server-latest'} /opt/seafile/ /mnt/NASbarracuda1TB/backup/pi2/seafile
|
||||||
|
|
||||||
|
# external piseafile (seafile-data & gitea)
|
||||||
|
sudo rsync -azh --log-file=${ROOTDIR}/status.log /mnt/piseafile/ /mnt/NASbarracuda1TB/backup/pi2/piseafile
|
||||||
|
|
||||||
|
# copy logs
|
||||||
|
cp $ERRORFILE /mnt/NASbarracuda1TB/backup/pi2/error.log
|
||||||
|
cp $STATUSFILE /mnt/NASbarracuda1TB/backup/pi2/status.log
|
||||||
11689
status.log
Executable file
11689
status.log
Executable file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user