« Synology divers » : différence entre les versions
Ligne 23 : | Ligne 23 : | ||
== Synchro backup == | == Synchro backup == | ||
étape 1 | |||
ssh-keygen -t dsa -b 1024 -f /volume1/users/toto/.ssh/id_dsa | ssh-keygen -t dsa -b 1024 -f /volume1/users/toto/.ssh/id_dsa | ||
chmod 0600 /volume1/users/toto/.ssh/* | chmod 0600 /volume1/users/toto/.ssh/* | ||
étape 2 | |||
ssh user@ip 'cat >> /home/user/.ssh/authorized_keys2' < /volume1/users/toto/.ssh/id_dsa.pub | ssh user@ip 'cat >> /home/user/.ssh/authorized_keys2' < /volume1/users/toto/.ssh/id_dsa.pub | ||
rm /volume1/users/toto/.ssh/id_dsa.pub | rm /volume1/users/toto/.ssh/id_dsa.pub | ||
étape3 | |||
SERVER="user@ip:/rep/" | SERVER="user@ip:/rep/" | ||
REP="/un/rep/" | REP="/un/rep/" |
Version du 27 août 2019 à 14:45
IPKG not found
en root: vi /etc/rc.local ajouter mount -o bind /volume1/@optware /opt puis /root/.profile ajouter PATH=/opt/bin:/opt/sbin:/sbin:/bin:/usr/sbin:...etc synoservicectl --restart sshd
DSM5
synoservicectl --reload sshd
apache
/usr/syno/apache/conf alias: /usr/syno/apache/conf/extra/httpd-autoindex.conf-user
ascii
générateur texte ascii: http://www.network-science.de/ascii/
synchro ssh numero de port
rsync -avz --no-owner --no-group --no-perms -e "ssh -pXXXX" "/source/" user@XX.XX.XX.XX:/destination/
Synchro backup
étape 1
ssh-keygen -t dsa -b 1024 -f /volume1/users/toto/.ssh/id_dsa chmod 0600 /volume1/users/toto/.ssh/*
étape 2
ssh user@ip 'cat >> /home/user/.ssh/authorized_keys2' < /volume1/users/toto/.ssh/id_dsa.pub rm /volume1/users/toto/.ssh/id_dsa.pub
étape3
SERVER="user@ip:/rep/" REP="/un/rep/" SORTIE=$(/usr/syno/bin/rsync -avz --delete --no-owner --no-group --rsync-path="sudo rsync" -e "ssh -i /volume1/users/toto/.ssh/id_dsa" $SERVER $REP)
relancer sshd
synoservicectl --restart sshd synoservicectl --reload sshd (DSM5) /usr/syno/etc.defaults/rc.d/S95sshd.sh restart
IPKG
.profile -> PATH=/opt/bin:/opt/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin
sudoers
editer le sudoers : sudo visudo user1 ALL=(ALL) NOPASSWD: ALL
basculer en root:
sudo su -
recherche
super finder sur windows
*.bak ; *.tmp; *.~*; *.ini; *.db; *.m4a; *.mp4; *.jpg; *.mp3; *.flac
ou ssh
find "/rep" -name '*\.txt' -o -name '*\.jpg'
supprimer
find "/rep" -name '*\.txt' -o -name '*\.jpg' -exec rm -f {} \;