参照官方的备份手册做了备份,备份与恢复 - seatable-manual
系统是centos7,按照开发版的官方操作说明部署的
然后使用crontab设置每天凌晨1点执行备份到群晖的nas上,现在遇到的问题是:
1、数据库备份3个库都能成功。
2、 备份 SeaTable 数据目录会有 部分文件提示备份失败,失败的部分错误提示如下:
rsync: chgrp “/seatable/data” (in NetBackup) failed: Operation not permitted (1)
rsync: chgrp “/seatable/data/seatable” (in NetBackup) failed: Operation not permitted (1)
rsync: chgrp “/seatable/data/seatable/conf” (in NetBackup) failed: Operation not permitted (1)
rsync: chgrp “/seatable/data/seatable/conf/pycache” (in NetBackup) failed: Operation not permitted (1)
rsync: chgrp “/seatable/data/seatable/scripts” (in NetBackup) failed: Operation not permitted (1)
rsync: chgrp “/seatable/data/seatable/seafile-data” (in NetBackup) failed: Operation not permitted (1)
rsync: chgrp “/seatable/data/seatable/seafile-data/seafile.sock” (in NetBackup) failed: Operation not permitted (1)
rsync: chgrp “/seatable/data/seatable/seafile-data/httptemp” (in NetBackup) failed: Operation not permitted (1)
rsync: chgrp “/seatable/data/seatable/seafile-data/httptemp/cluster-shared” (in NetBackup) failed: Operation not permitted (1)
rsync: chgrp “/seatable/data/seatable/seafile-data/storage” (in NetBackup) failed: Operation not permitted (1)
rsync: chgrp “/seatable/data/seatable/seafile-data/storage/blocks” (in NetBackup) failed: Operation not permitted (1)
rsync: chgrp “/seatable/data/seatable/seafile-data/storage/blocks/5a489f48-6b80-48db-b002-435932bfbe4b” (in NetBackup) failed: Operation not permitted (1)
rsync: chgrp “/seatable/data/seatable/seafile-data/storage/blocks/5a489f48-6b80-48db-b002-435932bfbe4b/05” (in NetBackup) failed: Operation not permitted (1)
rsync: chgrp “/seatable/data/seatable/seafile-data/storage/blocks/f3171ee2-4b3b-40ed-bcd9-3a3d6a73d415/3b/.7a111126f83cadb254cc0c6fabead7783e2dcb.t4Bmhi” (in NetBackup) failed: Operation not permitted (1)
rsync: chgrp “/seatable/data/seatable/seafile-data/storage/commits/f3171ee2-4b3b-40ed-bcd9-3a3d6a73d415/6f” (in NetBackup) failed: Operation not permitted (1)
rsync: chgrp “/seatable/data/seatable/seafile-data/storage/fs/5a489f48-6b80-48db-b002-435932bfbe4b/6c/.aef7b0e5e7bb52166afaf944b9fbfc1bcc2f24.FYwam2” (in NetBackup) failed: Operation not permitted (1)
rsync: chgrp “/seatable/data/seatable/seahub-data/avatars/.default.png.3Y4qpX” (in NetBackup) failed: Operation not permitted (1)rsync: chgrp “/seatable/data/seatable/storage-data/f5/f558ed78-b375-4e53-be92-1962b295f348/snapshots/.f50869f7-2746-4602-b53f-0fe3a29a785e.6iO68m” (in NetBackup) failed: Operation not permitted (1)
rsync: chgrp “/seatable/databases/.ccnet_db.sql.3wu7BX” (in NetBackup) failed: Operation not permitted (1)
rsync: chgrp “/seatable/databases/.dtable_db.sql.IBE5fy” (in NetBackup) failed: Operation not permitted (1)
rsync: chgrp “/seatable/databases/.seafile_db.sql.8Jvy6F” (in NetBackup) failed: Operation not permitted (1)
sent 368,902,393 bytes received 2,913,894 bytes 10,186,747.59 bytes/sec
total size is 687,633,204 speedup is 1.85
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1179) [sender=3.1.2]
由于错误的提示非常多,我这里也就挑了一些典型的粘贴过来
我备份的命令是这样的
第一步:备份到本地备份目录
rsync -az --exclude ‘ccnet’ --exclude ‘logs’ --exclude ‘pids’ --exclude ‘db-data’ /opt/seatable/seatable-data/seatable /opt/seatable-backup/data/
第二歩:将本地备份目录同步到群晖服务器
rsync -av /opt/seatable-backup/ seatable@192.168.10.2::NetBackup/seatable/ --password-file=/etc/rsync.password
上述两个命令加上3个数据库的备份命令是写在/root/backup_to_nas.sh这个备份脚本里面的,然后使用crontab -e添加0 1 * * * /root/backup_to_nas.sh(每天凌晨1点执行备份),并给备份脚本添加运行权限。
/root/backup_to_nas.sh脚本运行后,检查nas的备份目录和本地目录,都有备份文件存在
但是脚本运行时会跳出非常多的错误提示部分文件没有权限不允许操作,请问高手这是什么情况,非常感谢。