nextcloud使用中遇到的问题

备份机器的内存使用太高

A虚拟机做了一个nextcloud,搭建了私有网盘。
B虚拟机同样的系统环境,作为nextcloud的备份盘。
A机器计划任务执行的rsync

cat /etc/crontab
*  1  * * *  root /var/www/sql/bak.sh

cat   /var/www/sql/bak.sh
#! /bin/bash
a=`date +%y-%m-%d`
mysqldump -uroot -proot nextcloud_db > /var/www/sql/$a.sql 
rsync -avz --delete  /var/www  linx00:/var  &> /dev/null

使用后,隔了几周,查看B机器,free,16G内存竟然被占满了,
通过 ps -ef | grep rsync,几天前 的命令还存在一直占用内存空间。

通过释放未能解决,后来重启释放。。。。。(未解决)

后台创建的文件,如何Nextcloud中显示

OCC(ownCloud console)是ownCloud的命令行工具(也用于Nextcloud),OCC文件默认情况下在nextCloud/ownCloud的根目录下
(A机器安装在/var/www/nextcloud)

Files:scan的用法:
格式:

files:scan [-p|--path="..."] [-q|--quiet] [-v|vv|vvv --verbose] [--all] [user_id1] ... [user_idN]

user_id #扫描所指定的用户(一个或多个,多个用户ID之间要使用空格分开)的所有文件

选项:

--path #限制扫描路径 
--all #扫描所有已知用户的所有文件
--quiet #不输出统计信息 
--verbose #在扫描过程中显示正在处理的文件和目录 
--unscanned #仅扫描以前未扫描过的文件

扫描所有用户的所有文件具体命令:

sudo -u www-data php occ files:scan --all 

扫描所有用户的所有文件,www-data是文件拥有者的用户名,哪个用户启动的Web服务器,所有者就是谁,就填写谁的名字。

OCC文件位于nextCloud的根目录下,如果当前目录不是nextCloud的根目录,则需要补全OCC的路径。

如果你给OCC文件添加了可执行权限,那我们的命令里面可以省略php,OCC文件开头已经指定了由php执行。

机器测试如下

root@A:/var/www/nextcloud#  ls
3rdparty  console.php  data        *occ*           public.php  settings    version.php
apps      COPYING      index.html  ocm-provider  remote.php  status.php
AUTHORS   core         index.php   ocs           resources   themes
config    cron.php     lib         ocs-provider  robots.txt  updater
##进入文件存放位置
root@Linx:/var/www/nextcloud/data/admin/files# touch  aaaa
### 查看其他文件所属是netadmin,也将aaaa更换为netadmin
root@Linx:/var/www/nextcloud/data/admin/files# chown netadmin:netadmin   aaaa
root@Linx:/var/www/nextcloud/data/admin/files# ls -al
总用量 3080
drwxr-xr-x  7 netadmin netadmin    4096 3月  30 15:54 .
drwxr-xr-x  7 netadmin netadmin    4096 1月  11 15:04 ..
-rw-r--r--  1 netadmin netadmin       0 3月  30 15:54 aaaa

root@Linx:/var/www/nextcloud# sudo -u netadmin occ files:scan --all
sudo:occ:找不到命令
root@Linx:/var/www/nextcloud# sudo -u netadmin php occ files:scan --all
Starting scan for user 1 out of 45 (admin)
Starting scan for user 2 out of 45 (bbzhu)
Starting scan for user 3 out of 45 (dzwang)
Starting scan for user 4 out of 45 (ffliu)
Starting scan for user 5 out of 45 (hguo)
Starting scan for user 6 out of 45 (hmcao)
Starting scan for user 7 out of 45 (hxcao)
Starting scan for user 8 out of 45 (jcyang)
Starting scan for user 9 out of 45 (jczhang)
Starting scan for user 10 out of 45 (jplv)
Starting scan for user 11 out of 45 (jwzou)
Starting scan for user 12 out of 45 (jyshi)
Starting scan for user 13 out of 45 (lshou)
Starting scan for user 14 out of 45 (lzhu)
Starting scan for user 15 out of 45 (mli)
Starting scan for user 16 out of 45 (mxie)
Starting scan for user 17 out of 45 (pcsong)
Starting scan for user 18 out of 45 (pzhang)
Starting scan for user 19 out of 45 (qjhuang)
Starting scan for user 20 out of 45 (scfu)
Starting scan for user 21 out of 45 (sqzhou)
Starting scan for user 22 out of 45 (ssxu)
Starting scan for user 23 out of 45 (stao)
Starting scan for user 24 out of 45 (swang)
Starting scan for user 25 out of 45 (syang)
Starting scan for user 26 out of 45 (tczhang)
Starting scan for user 27 out of 45 (tjzhang)
Starting scan for user 28 out of 45 (wlliu)
Starting scan for user 29 out of 45 (wwwu)
Starting scan for user 30 out of 45 (wzhang)
Starting scan for user 31 out of 45 (xfye)
Starting scan for user 32 out of 45 (xlin)
Starting scan for user 33 out of 45 (xmwu)
Starting scan for user 34 out of 45 (xpzhu)
Starting scan for user 35 out of 45 (xwliu)
Starting scan for user 36 out of 45 (ychi)
Starting scan for user 37 out of 45 (ydai)
Starting scan for user 38 out of 45 (yfzhao)
Starting scan for user 39 out of 45 (yguo)
Starting scan for user 40 out of 45 (yren)
Starting scan for user 41 out of 45 (yrli)
Starting scan for user 42 out of 45 (ysji)
Starting scan for user 43 out of 45 (z)
Starting scan for user 44 out of 45 (zfeng)
Starting scan for user 45 out of 45 (zmgu)
+---------+-------+--------------+
| Folders | Files | Elapsed time |
+---------+-------+--------------+
| 540     | 1234  | 00:00:02     |
+---------+-------+--------------+

后去网页上查看,已正常显示aaaa

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
使用Nextcloud应用镜像搭建云盘是一种方便快捷的方式。Nextcloud是一个开源的云端协作平台,可以允许用户存储、同步和分享文件。应用镜像则将Nextcloud的安装和配置过程打包为一个可部署的镜像,可以在各种不同的环境快速搭建云盘系统。 首先,你需要选择一个适合的环境来部署Nextcloud镜像。这可以是你自己的个人服务器、虚拟机或者云提供商的实例。确保你的环境满足Nextcloud的最低系统要求,如PHP、MySQL或MariaDB等。 接下来,下载Nextcloud应用的镜像文件。你可以从Nextcloud官方网站或各种可信的镜像仓库获取。确保你选择的镜像版本与你的环境兼容。 一旦你下载了镜像文件,你可以使用命令行或者镜像管理工具来部署镜像。在命令行,你可以使用docker命令来运行镜像。运行命令时,你需要指定相关的配置参数,如端口、数据存储路径和数据库连接信息等。 运行命令后,Nextcloud镜像将会下载并自动部署。一旦部署完成,你可以通过浏览器访问指定的端口来使用Nextcloud云盘系统。在首次访问时,你需要进行一些简单的设置,如创建管理员账号和配置存储位置等。 使用Nextcloud应用镜像搭建云盘可以减少许多复杂的安装和配置步骤。它提供了一个简单且灵活的方式来快速搭建一个私有的云盘系统,方便用户存储和分享文件。同时,Nextcloud还提供了许多强大的功能和扩展,如日历、联系人管理和协作办公等,可以满足不同用户的需求。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值