# 数据备份和恢复的时候报错 mv: can't remove '/data/gitea/actions\_artifacts': Is a directory

**URL:** <https://forum.gitea.com/t/mv-cant-remove-data-gitea-actions-artifacts-is-a-directory/8592>\
**Category:** 中文求助(Chinese Only)\
**Created:** [February 19, 2024, 6:07am UTC](https://forum.gitea.com/t/mv-cant-remove-data-gitea-actions-artifacts-is-a-directory/8592 "2024-02-19T06:07:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![huangcheng](https://avatars.discourse-cdn.com/v4/letter/h/bc8723/32.png) [@huangcheng](https://forum.gitea.com/u/huangcheng)\
**Post date:** [February 19, 2024, 6:07am UTC](https://forum.gitea.com/t/mv-cant-remove-data-gitea-actions-artifacts-is-a-directory/8592/1 "2024-02-19T06:07:10Z")

</div>

尝试docker 数据备份和恢复  
在按照官网手册恢复数据的时候报以下错误：  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/gitea/original/2X/2/2f96e372b8ea117405c169ed40b8d14748b59969.png)

---

<div class="post-metadata">

**Author:** ![huangcheng](https://avatars.discourse-cdn.com/v4/letter/h/bc8723/32.png) [@huangcheng](https://forum.gitea.com/u/huangcheng)\
**Post date:** [February 19, 2024, 12:35pm UTC](https://forum.gitea.com/t/mv-cant-remove-data-gitea-actions-artifacts-is-a-directory/8592/2 "2024-02-19T12:35:50Z")

</div>

问题已解决，  
解决方法：  
在使用mv 命令前先清空下目标文件夹

```auto
rm -rf /data/gitea/*
rm -rf /data/git/repositories/*
mv data/* /data/gitea
mv repos/* /data/git/repositories/

```
