浏览模式: 标准 | 列表 2021年01月的文章

Linux系统迁移小文件数据

需要将Linux A服务器数据迁移到Linux B服务器,但是A有较多小文件,通过scp传输会占用较多时间。那么采用先打包(压缩)所有文件,再传输,再解压,则需要人工值守,且时间不一定会少很多。

那么可以采用压缩,传输,解压同步进行的方案:

B为默认开启SSH登录(22端口不变),需要将A当前目录下的web文件夹进行打包传输至B的/home目录下,假设B的IP为192.168.1.2

tar czf - web | ssh root@192.168.1.2 tar xzf - -C /home

若B的ssh端口改了,比如改为1688,则命令如下:

tar czf - web | ssh -p 1688 root@192.168.1.2 tar xzf - -C /home

数据库出错:

MySQL Query Error
Mysql error description: Duplicate entry '0' for key 'uid'
Mysql error number: 1062
Date: 2024-06-04 @ 01:09
Script: http://blog.is36.com/index.php/fr/category/umjagchiteli-bytovye-atoll-excellence/auxpage_1/category/559/auxpage_2/auxpage_1/product/trehstupenchatyj-filtr-atoll-a-32beiki-32bi-std-/links/date/201704/archives/437/templates/default/archives/435/archives/441/category/technology_all/page/8/links/comments/https:/blog.is36.com/index.php/fr/category/umjagchiteli-bytovye-atoll-excellence/auxpage_1/category/559/auxpage_2/auxpage_1/product/trehstupenchatyj-filtr-atoll-a-32beiki-32bi-std-/links/date/201704/archives/437/templates/default/archives/435/archives/441/category/technology_all/page/8/links/comments/page/7/?action=article&setdate=202101