search

Home  >  Q&A  >  body text

ubuntu - 通常情况下,个人Linux系统进行备份应该备份哪些目录或是文件?

以上图片是我的Linux PC的目录,现在是Web开发,项目放在/var/www,home下面也有代码,隐藏目录下也有,安装了很多Lib,我想问的是PC Linux应该备份哪些目录?
或者应该以什么为标准? 哪些Lib需要备份?自己编译的动态链接库呢?

高洛峰高洛峰2787 days ago707

reply all(8)I'll reply

  • 天蓬老师

    天蓬老师2017-04-17 11:15:25

    Personally, I think backing up /home is enough. If /home is partitioned separately, it can reduce the probability of data loss due to system damage.

    If you have installed a web server and the root path is not in /home/, back up the contents of the root path as well.

    reply
    0
  • 高洛峰

    高洛峰2017-04-17 11:15:25

    Not long ago I saw an article discussing why some people have less luggage as they live longer, while some people have to carry more and more things. I think it should be suitable for many situations:-)

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 11:15:25

    One is the code and other files you wrote yourself, and the other is the configuration file that matches the environment. If there is a database, the database must also be exported and backed up. Generally, I back up these.

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-17 11:15:25

    1. Code, but most of the code can be put on Github or backed up on a USB flash drive.
    2. Configuration files, .bashrc, .vim, etc., as well as various plug-ins. Generally speaking, I configure some personal habits of the computer and make a wiki online to avoid forgetting it the next time I reinstall.

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-17 11:15:25

    Everything under /home needs to be backed up, or your commonly used user directory under /home.
    ps: If you often play Linux, you don’t seem to ask this question.

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 11:15:25

    The most important thing is the configuration file of the related software, such as the configuration file of the web server ngiinx. The rest are of course ordinary usage files

    Final emphasis: I don’t think it is necessary to back up the files that can be downloaded online at any time (I have a 64G ssd). The configuration file is the most important

    reply
    0
  • 迷茫

    迷茫2017-04-17 11:15:25

    Put it all on github. Under Linux, it mainly contains configuration files. As long as you back up the configuration files, it will be fine

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-17 11:15:25

    Same question. . Where do you put the libraries and source code you compiled yourself? /usr/local No? Do you also need to back it up?

    reply
    0
  • Cancelreply