J'utilise cette commande pour sauvegarder certains fichiers de configuration importants :
tar -czvf /var/backups/201102121202.tgz -C / etc/crontab etc/httpd/conf.d/* etc/httpd/conf/httpd.conf etc/httpd/passwords etc/httpd/vhost/* etc/php.ini etc/my.cnf etc/ssh/* etc/hosts etc/sysconfig/iptables var/spool/cron/* etc/passwd etc/group root/iptables_config etc/postfix/main.cf etc/postfix/master.cf etc/postfix/transport etc/postfix/valid_recipients etc/postfix/virtual etc/sysconfig/memcached etc/php.d/apc.ini etc/selinux/config etc/yum.repos.d/* etc/list_of_installed_packages.txt etc/safe-rm.conf home/*/.bash* home/*/.ssh usr/local/bin/* usr/local/sbin/* /etc/pki/tls/certs/mysite.com.crt /etc/pki/tls/private/mysite.key /etc/pki/tls/certs/gd_bundle.crt
Quand je le lance, j'obtiens :
tar: etc/httpd/conf.d/*: Cannot stat: No such file or directory
tar: etc/httpd/vhost/*: Cannot stat: No such file or directory
tar: etc/ssh/*: Cannot stat: No such file or directory
tar: var/spool/cron/*: Cannot stat: No such file or directory
tar: etc/yum.repos.d/*: Cannot stat: No such file or directory
tar: home/*/.bash*: Cannot stat: No such file or directory
tar: home/*/.ssh: Cannot stat: No such file or directory
tar: usr/local/bin/*: Cannot stat: No such file or directory
tar: usr/local/sbin/*: Cannot stat: No such file or directory
tar: Removing leading `/' from member names
tar: Error exit delayed from previous errors
Il semble que je ne puisse pas utiliser de caractères génériques dans les chemins.
Comment puis-je réparer ou contourner ce problème ?
Merci,
Dan
0 votes
Quel Shell utilisez-vous ?
0 votes
J'utilise bash