Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 25/01/2018, à 13:59

Balba

[Résolu] BACKUP MANAGER plusieurs types de sav sur le même serveur

Bonjour,

Je suis en train de travailler sur la sauvegarde automatique des fichiers d'un serveur VPS OVH sur lequel j’héberge les données de 5 clients ( A B C D E).
J'ai paramétré le fichier backup-manager.conf qui fait 5 sauvegardes séparées, et qui envoie par FTP les 5 fichiers sur mon serveur de stockage. La procédure est automatisée dans cron.daily, et s'exécute parfaitement tous les jours.

Le client B me demande d'avoir en plus une sauvegarde sur son FTP. J'ai donc créé un fichier backup-manager-clientB.conf

Pour bien distinguer les deux sauvegardes, j'ai paramétré:
_ BM_TARBALL_NAMEFORMAT = "long"  pour le fichier tar.gz généré dans backup-manager.conf (5 clients)
_ BM_TARBALL_NAMEFORMAT = "short"  pour le fichier tar.gz généré dans backup-manager-clientB.conf (client B uniquement)

Lorsque j'exécute le fichier "clientB" avec la commande:

sudo backup-manager -c /etc/backup-manager-clientB.conf

, je constate que je trouve sur le FTP du client B :
_ la sauvegarde demandée (client B - tarball name format short),
_ mais aussi les autres 5 sauvegardes des clients A B C D E !! (tarball name format long),

C'est comme si la commande sudo backup-manager -c /etc/backup-manager-clientB.conf  éxécutait les deux fichiers conf, un après l'autre (backup-manager-clientB.conf en premier).

Connaissez vous un moyen / une commande pour exécuter uniquement le backup-manager-clientB.conf ?

Merci par avance pour votre aide !
Michael

Dernière modification par Balba (Le 15/03/2018, à 14:21)

Hors ligne

#2 Le 25/01/2018, à 14:13

Arbiel

Re : [Résolu] BACKUP MANAGER plusieurs types de sav sur le même serveur

Bonjour

Le montage est un moyen relativement simple pour modifier le contenu d'un dossier ou d'un fichier sans l'écraser.

Tu pourrais donc envisager de monter un fichier vide sur le fichier backup-manager.conf de sorte que lors de la seconde exécution la prise en compte de ce fichier n'entraîne aucune copie, ou de monter sur le répertoire qui contiendrait ton seul fichier backup-manager.conf un répertoire qui ne contiendrait que backup-manager-clientB.conf, qui d'ailleurs pourrait s'y appeler également backup-manager.conf.

Mais je n'ai aucune connaissance de l'application backup-manager, et elle propose peut-être un moyen plus simple pour résoudre ton problème.

Arbiel


Arbiel Perlacremaz
LDLC Aurore NK3S-8-S4 Ubuntu 20.04
Abandon d'azerty au profit de bépo, de google au profit de Lilo et de la messagerie électronique violable au profit de Protonmail, une messagerie chiffrée de poste de travail à poste de travail.

Hors ligne

#3 Le 26/01/2018, à 15:14

Balba

Re : [Résolu] BACKUP MANAGER plusieurs types de sav sur le même serveur

Je viens de faire un essai en supprimant backup-manager.conf, et en exécutant

sudo backup-manager -c /etc/backup-manager-clientB.conf

Résultat, j'ai bien le même problème :
_ la sauvegarde demandée (client B - tarball name format short),
_ mais aussi les autres 5 sauvegardes des clients A B C D E !! (tarball name format long),

Pourant , je n'ai bien qu'un seul répertoire dans backup-manager-clientB.conf
export BM_TARBALL_DIRECTORIES="/var/www/html/ClientB"

##############################################################
# Section "TARBALL"
# - Backup method: tarball
#############################################################

# Archive filename format
#       long  : host-full-path-to-folder.tar.gz
#       short : parentfolder.tar.gz
export BM_TARBALL_NAMEFORMAT="short"

# Type of archives
# Available types are:
#     tar, tar.gz, tar.bz2, tar.lz, dar, zip.
# Make sure to satisfy the appropriate dependencies
# (bzip2, dar, lzma, ...).
export BM_TARBALL_FILETYPE="tar.gz"

# You can choose to build archives remotely over SSH.
# You will then need to fill the BM_UPLOAD_SSH variables
# (BM_UPLOAD_SSH_HOSTS, BM_UPLOAD_SSH_USER, BM_UPLOAD_SSH_KEY).
# If this boolean is set to true, archive will be saved locally (in
# BM_REPOSITORY_ROOT but will be built by the remote host).
# Thus, BM_TARBALL_DIRECTORIES will be used to backup remote directories.
# Those archive will be prefixed with the remote host name.
export BM_TARBALL_OVER_SSH="false"

# Do you want to dereference the files pointed by symlinks ?
# enter true or false (true can lead to huge archives, be careful).
export BM_TARBALL_DUMPSYMLINKS="false"

# Targets to backup

# You can use two different variables for defining the targets of
# your backups, either a simple space-separated list (BM_TARBALL_DIRECTORIES)
# or an array (BM_TARBALL_TARGETS[]).
# Use the first one for simple path that doesn't contain spaces in their name.
# Use the former if you want to specify paths to backups with spaces.

# It's recommanded to use BM_TARBALL_TARGETS[] though.
# Warning! You *must not* use both variables at the same time.
# NOTE: The Debian package will only update BM_TARBALL_DIRECTORIES

# Paths without spaces in their name:
##############################################################
# Section "TARBALL"
# - Backup method: tarball
#############################################################

# Archive filename format
#       long  : host-full-path-to-folder.tar.gz
#       short : parentfolder.tar.gz
export BM_TARBALL_NAMEFORMAT="short"

# Type of archives
# Available types are:
#     tar, tar.gz, tar.bz2, tar.lz, dar, zip.
# Make sure to satisfy the appropriate dependencies
# (bzip2, dar, lzma, ...).
export BM_TARBALL_FILETYPE="tar.gz"

# You can choose to build archives remotely over SSH.
# You will then need to fill the BM_UPLOAD_SSH variables
# (BM_UPLOAD_SSH_HOSTS, BM_UPLOAD_SSH_USER, BM_UPLOAD_SSH_KEY).
# If this boolean is set to true, archive will be saved locally (in
# BM_REPOSITORY_ROOT but will be built by the remote host).
# Thus, BM_TARBALL_DIRECTORIES will be used to backup remote directories.
# Those archive will be prefixed with the remote host name.
export BM_TARBALL_OVER_SSH="false"

# Do you want to dereference the files pointed by symlinks ?
# enter true or false (true can lead to huge archives, be careful).
export BM_TARBALL_DUMPSYMLINKS="false"

# Targets to backup

# You can use two different variables for defining the targets of
# your backups, either a simple space-separated list (BM_TARBALL_DIRECTORIES)
# or an array (BM_TARBALL_TARGETS[]).
# Use the first one for simple path that doesn't contain spaces in their name.
# Use the former if you want to specify paths to backups with spaces.

# It's recommanded to use BM_TARBALL_TARGETS[] though.
# Warning! You *must not* use both variables at the same time.
# NOTE: The Debian package will only update BM_TARBALL_DIRECTORIES

# Paths without spaces in their name:
#     tar, tar.gz, tar.bz2, tar.lz, dar, zip.
# Make sure to satisfy the appropriate dependencies
# (bzip2, dar, lzma, ...).
export BM_TARBALL_FILETYPE="tar.gz"

# You can choose to build archives remotely over SSH.
# You will then need to fill the BM_UPLOAD_SSH variables
# (BM_UPLOAD_SSH_HOSTS, BM_UPLOAD_SSH_USER, BM_UPLOAD_SSH_KEY).
# If this boolean is set to true, archive will be saved locally (in
# BM_REPOSITORY_ROOT but will be built by the remote host).
# Thus, BM_TARBALL_DIRECTORIES will be used to backup remote directories.
# Those archive will be prefixed with the remote host name.
export BM_TARBALL_OVER_SSH="false"

# Do you want to dereference the files pointed by symlinks ?
# enter true or false (true can lead to huge archives, be careful).
export BM_TARBALL_DUMPSYMLINKS="false"

# Targets to backup

# You can use two different variables for defining the targets of
# your backups, either a simple space-separated list (BM_TARBALL_DIRECTORIES)
# or an array (BM_TARBALL_TARGETS[]).
# Use the first one for simple path that doesn't contain spaces in their name.
# Use the former if you want to specify paths to backups with spaces.

# It's recommanded to use BM_TARBALL_TARGETS[] though.
# Warning! You *must not* use both variables at the same time.
# NOTE: The Debian package will only update BM_TARBALL_DIRECTORIES

# Paths without spaces in their name:
export BM_TARBALL_DIRECTORIES="/var/www/html/ClientB"

# If one or more of the targets contain a space, use the array:
# declare -a BM_TARBALL_TARGETS
# BM_TARBALL_TARGETS[0]="/etc"
# BM_TARBALL_TARGETS[1]="/boot"
# export BM_TARBALL_TARGETS

# Files to exclude when generating tarballs, you can put absolute
# or relative paths, Bash wildcards are possible.
export BM_TARBALL_BLACKLIST="/var/archives"

# With the "dar" filetype, you can choose a maximum slice limit.
export BM_TARBALL_SLICESIZE="1000M"

# Extra options to append to the tarball generation
# (take care to what you do; this will be silently added to the
# command line.)
export BM_TARBALL_EXTRA_OPTIONS=""

Donc, les deux configurations sont bien exécutées, même si le fichier conf principal est supprimé ?!?!
Il y a qqch qui m'échappe !

Dernière modification par Balba (Le 26/01/2018, à 15:15)

Hors ligne

#4 Le 29/01/2018, à 08:46

Balba

Re : [Résolu] BACKUP MANAGER plusieurs types de sav sur le même serveur

Personne n'a une idée?
Merci par avance !

Michael

Hors ligne

#5 Le 01/02/2018, à 20:38

Balba

Re : [Résolu] BACKUP MANAGER plusieurs types de sav sur le même serveur

dernier up yikes

Hors ligne

#6 Le 15/03/2018, à 14:20

Balba

Re : [Résolu] BACKUP MANAGER plusieurs types de sav sur le même serveur

Problème résolu, ou plutôt contourné.

_ j'ai supprimé les fichiers .conf supplémentaires que j'avais créé (/etc/backup-manager-clientB.conf)
_ j'ai utilisé la fonction BM_POST_BACKUP_COMMAND dans le fichier .conf principal qui permet l'exécution d'un script shell d'envoi FTP à chaque fois que Backup manager est lancé.

En espérant que ça puisse aider.
Michael

Dernière modification par Balba (Le 15/03/2018, à 14:23)

Hors ligne