Add the rsync commands to the configuration file
This file is then send to the server, so BackupPC directly interpreter it.
This commit is contained in:
		
							parent
							
								
									4cf4e0dccb
								
							
						
					
					
						commit
						c1881635a1
					
				|  | @ -262,9 +262,10 @@ exclude="['ownCloud','.local/share/Trash','.cache','.Play*','.steam','.wine','Pe | |||
| echo "\$Conf{XferMethod} = 'rsync';" > "${filepl}" | ||||
| echo "\$Conf{RsyncShareName} = [${directories}];" >> "${filepl}" | ||||
| echo "\$Conf{BackupFilesExclude} = {'*' => ${exclude} };" >> "${filepl}" | ||||
| printf '\e[1;33m%-6s\e[m\n' "Fichier de configuration créé (${filepl})" | ||||
| printf '\e[1;33m%-6s\e[m\n' "DEBUG : Fichier de configuration créé (${filepl})" | ||||
| 
 | ||||
| #### LE SERVEUR DOIT CONNAITRE #### | ||||
| # Les commandes à exécuter avec sudo | ||||
| # ssh_host_ecdsa_key.pub DU CLIENT | ||||
| # L’ADRESSE MAIL | ||||
| # L'IP | ||||
|  | @ -274,8 +275,10 @@ printf '\e[1;35m%-6s\e[m\n' "DEBUG : Partie - Informations complémentaires da | |||
| printf '\e[1;34m%-6s\e[m' "Votre adresse e-mail : " | ||||
| read input_mail | ||||
| 
 | ||||
| echo "# host:${fqdn}" >> "${filepl}" | ||||
| echo "\$Conf{RsyncClientCmd} = '\$sshPath -q -x -l backuppc \$host sudo \$rsyncPath \$argList+';" >> "${filepl}" | ||||
| echo "\$Conf{RsyncClientRestoreCmd} = '\$sshPath -q -x -l backuppc \$host sudo \$rsyncPath \$argList+';" >> "${filepl}" | ||||
| 
 | ||||
| echo "# host:${fqdn}" >> "${filepl}" | ||||
| cmd_hostkey=$(cat "${hostkey}") | ||||
| echo "# hostkey:${cmd_hostkey}" >> "${filepl}" | ||||
| echo "# mail:${input_mail}" >> "${filepl}" | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue