correct smb and cron part in ssh guide
This commit is contained in:
parent
69f6fbc0ad
commit
a1c63072ae
@ -47,7 +47,7 @@ sudo apt install openssh-server
|
||||
|
||||
sudo apt install samba
|
||||
|
||||
### Configuration
|
||||
### Configuration du serveur
|
||||
|
||||
!!! note "/etc/samba/smb.conf
|
||||
[global]
|
||||
@ -77,6 +77,13 @@ sudo apt install openssh-server
|
||||
valid users = ktha
|
||||
comment = Serveur de fichiers Ktha Compagnie
|
||||
|
||||
### Configuration des clients
|
||||
|
||||
Il est nécessaire de configurer le WORKGROUP pour les clients, afin qu'ils soient autorisés à se connecter au serveur Samba:
|
||||
|
||||
```
|
||||
sudo sed -i 's/WORKGROUP/KTHA-CIE/' /etc/samba/smb.conf
|
||||
```
|
||||
|
||||
--------------
|
||||
|
||||
@ -88,12 +95,9 @@ sudo apt install openssh-server
|
||||
|
||||
### Création du script de sauvegarde
|
||||
|
||||
!!! note "/home/$USER/start_backup.sh"
|
||||
!!! note "/etc/cron.daily/backup"
|
||||
```
|
||||
#!/bin/bash
|
||||
rsync -ahv --update --delete --info=backup2,copy2,del2,name1,stats2 --log-file="/home/$USER/backup_log/backup.log.$(date +%Y-%m-%d)" /home/$USER/Documents/ -e 'ssh -p 3333' $USER@176.151.59.186:/home/$USER/Documents &
|
||||
rsync -ahv --update --delete --info=backup2,copy2,del2,name1,stats2 --log-file="/home/$USER/backup_log/backup.log.$(date +%Y-%m-%d)" /home/$USER/Documents/ -e 'ssh -p 43000' $USER@176.151.59.186:/home/$USER/Documents &
|
||||
```
|
||||
|
||||
### Création du cron
|
||||
|
||||
echo "0 2 * * * $USER bash /home/$USER/start_backup.sh # the script file backup.sh is scheduled to be executed every day at 2:00AM." |sudo tee -a /etc/crontab
|
||||
Les scripts présents dans `/etc/cron.daily` sont exécutés tous les matins à 6h00, comme défini dans `/etc/crontab`.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user