日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

mysql文件软连接失败,解决打包软链接打包失败问题

發(fā)布時間:2023/12/1 数据库 34 豆豆
生活随笔 收集整理的這篇文章主要介紹了 mysql文件软连接失败,解决打包软链接打包失败问题 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

一般情況下打包文件時,如果直接打包軟連接會導致打包失敗,即沒有將要打包的內容打包進去,這里提供tar打包參數(shù)-h

[root@localhost ~]# ll /etc/rc.local

lrwxrwxrwx. 1 root root 13 Nov 24 00:45 /etc/rc.local -> rc.d/rc.local

[root@localhost ~]# tar czf tar.gz /etc/rc.local

tar: Removing leading `/' from member names

[root@localhost ~]# ll

[root@localhost ~]# sz tar.gz

rz

Starting zmodem transfer. ?Press Ctrl+C to cancel.

100% ? ? 117 bytes ?117 bytes/s 00:00:01 ? ? ? 0 Errors

[root@localhost ~]#

發(fā)現(xiàn)打包結果并沒有將/etc/rc.local下的內容打包進來

所以這里用-h參數(shù)

[root@localhost ~]# tar czfh rc.local.tar.gz /etc/rc.local

tar: Removing leading `/' from member names

[root@localhost ~]# ll

total 84

-rw-------. 1 root root ?1508 Nov 24 00:48 anaconda-ks.cfg

drwxr-xr-x. 5 root root ?4096 Jun 10 ?2015 fabric-scripts

-rw-r--r--. 1 root root 17062 Dec 28 10:03 fabric-scripts.tar.gz

-rw-r--r--. 1 root root 33502 Nov 24 00:48 install.log

drwxr-xr-x. 2 root root ?4096 Apr ?7 15:08 logs

drwxr-xr-x. 3 root root ?4096 Mar 23 10:35 mysql-sql

-rw-r--r--. 1 root root ? 415 Apr 12 16:42 rc.local.tar.gz

-rw-r--r--. 1 root root ? 117 Apr 12 16:31 tar.gz

[root@localhost ~]# sz rc.local.tar.gz

rz

Starting zmodem transfer. ?Press Ctrl+C to cancel.

100% ? ? 415 bytes ?415 bytes/s 00:00:01 ? ? ? 0 Errors

[root@localhost ~]#

[root@localhost ~]# tar xf rc.local.tar.gz

[root@localhost ~]# ll

-rw-r--r--. 1 root root ? 415 Apr 12 16:42 rc.local.tar.gz

-rw-r--r--. 1 root root ? 117 Apr 12 16:31 tar.gz

[root@localhost ~]# cd etc/

[root@localhost etc]# ll

total 4

-rwxr-xr-x. 1 root root 420 Mar ?8 14:36 rc.local

[root@localhost etc]# cat rc.local

#!/bin/sh

#

# This script will be executed *after* all the other init scripts.

# You can put your own initialization stuff in here if you don't

# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

#startup Open*** on boot

/usr/local/sbin/open*** --config /etc/open***/product.server.conf &

#add a iptables ruler

/sbin/iptables -t nat -I POSTROUTING -s 10.8.0.0/255.255.255.0 -o eth0 -j MASQUERADE

[root@localhost etc]#

至此,用tar打包軟連接實際目錄下內容操作成功

總結

以上是生活随笔為你收集整理的mysql文件软连接失败,解决打包软链接打包失败问题的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內容還不錯,歡迎將生活随笔推薦給好友。