diff --git a/README_FR.md b/README_FR.md index 0971ad5..addb351 100644 --- a/README_FR.md +++ b/README_FR.md @@ -57,10 +57,10 @@ On récupère les sources via https://forge.evolix.org/projects/evobackup/reposi > **Notes :** > - Si l'on veut plusieurs backups dans la journée (1 par heure maximum), - on pourra lancer `bkctl inc` à plusieurs reprises… + on pourra lancer `bkctld inc` à plusieurs reprises… Ce qui fonctionnera sous réserve qu'entre temps les données ont bien changés ! > - Si l'on ne veut **jamais** supprimer les backups incrémentaux, on pourra se contenter - de ne jamais lancer la coomande `bkctl rm`. + de ne jamais lancer la coomande `bkctld rm`. Si le noyau du serveur est patché avec *GRSEC*, on évitera pas mal de warnings en positionnant les paramètres Sysctl suivants : @@ -74,23 +74,23 @@ Créer une prison --- Créer la prison : - # bkctl init + # bkctld init Changer le port d'écoute (defaut: 2222) : - # bkctl port + # bkctld port Autoriser une clé publique : - # bkctl key + # bkctld key Lancer la prison : - # bkctl start + # bkctld start Vérifier que tout est OK : - # bkctl status + # bkctld status − Gestion des sauvegardes incrémentales : @@ -124,7 +124,7 @@ toutes les 15 jours, le 1er janvier de chaque année, etc.) Attention, la création de ce fichier est **obligatoire** pour activer les copies incrémentales. Si l'on veut garder des copies *advitam aeternam* sans jamais les supprimer, on se contentera de ne pas lancer le script -`bkctl rm`. +`bkctld rm`. − Copier une prison sur un second serveur : diff --git a/bkctl b/bkctld similarity index 96% rename from bkctl rename to bkctld index 8d4eda4..abd1745 100755 --- a/bkctl +++ b/bkctld @@ -1,11 +1,11 @@ #!/bin/bash # -# bkctl is a shell script to create and manage a backup server which will +# bkctld is a shell script to create and manage a backup server which will # handle the backup of many servers (clients). id=$(id -u) if [ $id != 0 ]; then - echo "Error, you need to be root to run bkctl !" >&2 + echo "Error, you need to be root to run bkctld !" >&2 exit 1 fi @@ -17,7 +17,7 @@ else fi sub_help(){ - echo "Usage: bkctl [options]" + echo "Usage: $0 [options]" echo "Subcommands:" echo " init Init jail " echo " update (|all) Update jail or all" @@ -92,8 +92,8 @@ sub_start() { echo "Jail $jail already running !" >&2 exit 1 fi - mount -t proc bkctl-proc-${jail} ${JAILDIR}/${jail}/proc/ - mount -nt tmpfs bkctl-dev-${jail} ${JAILDIR}/${jail}/dev + mount -t proc bkctld-proc-${jail} ${JAILDIR}/${jail}/proc/ + mount -nt tmpfs bkctld-dev-${jail} ${JAILDIR}/${jail}/dev mknod -m 622 ${JAILDIR}/${jail}/dev/console c 5 1 mknod -m 666 ${JAILDIR}/${jail}/dev/null c 1 3 mknod -m 666 ${JAILDIR}/${jail}/dev/zero c 1 5 @@ -167,13 +167,13 @@ sub_sync() { port=$(get_port $jail) key=$(get_key $jail) rsync -a ${CONFDIR}/$jail $NODE:${CONFDIR}/$jail - bkctl key $jail > /tmp/evobackup-${jail}.pub + bkctld key $jail > /tmp/evobackup-${jail}.pub rsync -a /tmp/evobackup-${jail}.pub $NODE:/tmp/evobackup-${jail}.pub - ssh $NODE bkctl init $jail - ssh $NODE bkctl port $jail $port - ssh $NODE bkctl key $jail /tmp/evobackup-${jail}.pub + ssh $NODE bkctld init $jail + ssh $NODE bkctld port $jail $port + ssh $NODE bkctld key $jail /tmp/evobackup-${jail}.pub for ip in $(get_ip $jail); do - ssh $NODE bkctl ip $jail $ip + ssh $NODE bkctld ip $jail $ip done } diff --git a/install.sh b/install.sh index 9663485..a18efe4 100755 --- a/install.sh +++ b/install.sh @@ -14,11 +14,11 @@ fi mkdir -m 0755 -p $TPLDIR cp -v $dir/tpl/* $TPLDIR -install -m 0755 -v $dir/bkctl /usr/local/sbin/ +install -m 0755 -v $dir/bkctld /usr/local/sbin/ -crontab -l|grep -q bkctl +crontab -l|grep -q bkctld if [ $? != 0 ]; then - (crontab -l 2>/dev/null; echo "29 10 * * * bkctl inc && bkctl rm") | crontab - + (crontab -l 2>/dev/null; echo "29 10 * * * bkctld inc && bkctld rm") | crontab - fi dpkg -l sysvinit >/dev/null diff --git a/tpl/evobackup b/tpl/evobackup index c09b31f..c49008c 100755 --- a/tpl/evobackup +++ b/tpl/evobackup @@ -11,23 +11,23 @@ case "$1" in start) - bkctl start all + bkctld start all ;; stop) - bkctl stop all + bkctld stop all ;; reload|force-reload) - bkctl reload all + bkctld reload all ;; restart) - bkctl restart all + bkctld restart all ;; status) - bkctl status + bkctld status ;; *) diff --git a/tpl/evobackup.conf b/tpl/evobackup.conf index c796329..11739a8 100644 --- a/tpl/evobackup.conf +++ b/tpl/evobackup.conf @@ -1,5 +1,5 @@ -# Defaults for bkctl command (evobackup) -# sourced by /usr/sbin/bkctl or /usr/local/sbin/bkctl +# Defaults for bkctld command (evobackup) +# sourced by /usr/sbin/bkctld or /usr/local/sbin/bkctld CONFDIR='/etc/evobackup/' JAILDIR='/backup/jails/'