9 jours plus tard
Perso j'ai pas de mail qui partent y'a une config a faire en dehors du script ?
C'est volontaire de ne pas aborder la restauration à partir d'une archive ?
8 jours plus tard
Salut,

une personne a fait un test pour la sauvegarde vers un nas à la maison ?
Pour les mails, il faut avoir postfix.
Pour la restauration, une simple extraction des fichiers suffit.
Pour le NAS, si t'as un serveur FTP qui tourne dessus, aucun problème.
4 jours plus tard
Salut, est-ce normal? Merci
root@sd-45406:~# backup-manager
File /var/archives/sd-45406-etc.20151114.master.tar.gz already exists, skipping.
File /var/archives/sd-45406-var-www.20151114.master.tar.gz already exists, skipping.
File /var/archives/sd-45406-home.20151114.master.tar.gz already exists, skipping.
root@sd-45406:~# 
Salut,

voilà l'erreur que j'ai d'après les logs
unable to create directory 7 in FTP mode: 7: Permission denied.
The upload transfer "ftp" failed. 
Une idée ?
"On cherche la ligne AllowUsers et on ajoute backup-manager"

Perso j'ai ça nulle part dans /etc/ssh/sshd_config :

#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no

#MaxStartups 10:30:60
#Banner /etc/issue.net

# Allow client to pass locale environment variables
AcceptEnv LANG LC_*

Subsystem sftp internal-sftp

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
#UsePAM yes
Match User johnito
ChrootDirectory /home/johnito

Sinon, à corriger peut-être :
export BM_UPLOAD_DESTINATION="/home/archive/uploads"
Tu voulais plutôt dire (je pense) :
export BM_UPLOAD_DESTINATION="/home/archives/uploads"

Quand je teste à la fin sinon, j'ai un message d'erreur :
The "mysql" method is chosen, but  is not found.
Post-command failed.

En tout cas, SUPERBE tuto !!! Ca fait plaisir du taf comme ça !
Après arrachement de mes cheveux, je ne comprends toujours pas l'erreur que j'ai :s
unable to create directory 7 in FTP mode: 7: Permission denied.
The upload transfer "ftp" failed. 
spectre wrote:Après arrachement de mes cheveux, je ne comprends toujours pas l'erreur que j'ai :s
unable to create directory 7 in FTP mode: 7: Permission denied.
The upload transfer "ftp" failed. 
Bah l'utilisateur que tu utilises pour te loguer n'a pas les droits de créer le dossier.
Peut-être une erreur d'arborescence ?
Johnito wrote:"On cherche la ligne AllowUsers et on ajoute backup-manager"

Perso j'ai ça nulle part dans /etc/ssh/sshd_config :

#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no

#MaxStartups 10:30:60
#Banner /etc/issue.net

# Allow client to pass locale environment variables
AcceptEnv LANG LC_*

Subsystem sftp internal-sftp

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
#UsePAM yes
Match User johnito
ChrootDirectory /home/johnito

Sinon, à corriger peut-être :
export BM_UPLOAD_DESTINATION="/home/archive/uploads"
Tu voulais plutôt dire (je pense) :
export BM_UPLOAD_DESTINATION="/home/archives/uploads"

Quand je teste à la fin sinon, j'ai un message d'erreur :
The "mysql" method is chosen, but  is not found.
Post-command failed.

En tout cas, SUPERBE tuto !!! Ca fait plaisir du taf comme ça !
Merci pour la correction.

Pour le AllowUsers, je pars du principe qu'on a utilisé le tuto de sécu de ex_rat dispo sur le forum.
    Jedediah wrote:
    spectre wrote:Après arrachement de mes cheveux, je ne comprends toujours pas l'erreur que j'ai :s
    unable to create directory 7 in FTP mode: 7: Permission denied.
    The upload transfer "ftp" failed. 
    Bah l'utilisateur que tu utilises pour te loguer n'a pas les droits de créer le dossier.
    Peut-être une erreur d'arborescence ?
    On est d'accord, tu parles de l'utilisateur sur le FTP ?
    NAS > Utilisateur qui peut créer un dossier.
    Marche pas :s
    toujours l'erreur même avec l'utilisateur admin de mon NAS/FTP

    Côté nas


    Côté Serveur
    # the user to use for the FTP connections/transfers
    export BM_UPLOAD_FTP_USER="manager"
    
    # the FTP user's password
    export BM_UPLOAD_FTP_PASSWORD="*********"
    
    # FTP specific remote hosts
    export BM_UPLOAD_FTP_HOSTS="domaine du serveur"
    Merci pour le tuto, je viens de l'installer.
    J'ai bien de voir que je peux même pas télécharger manuellement les sauvegardes en FTP.
    Erreur de transfert pour tout. Je déplace également les fichiers mais toujours erreur.
    Je ne comprends pas.
    Je viens de faire un test avec un mutualisé au travail.
    ça marche mais j'ai quand même une erreur. Les fichiers sont bien présent sur le FTP.
    Post-command failed. 
    20 jours plus tard
    Merci pour le tuto.

    J'ai deux petites questions par contre.

    - j'ai fait un test, a la fin j'ai
    Post-command failed. 
    Les fichiers sont bien présent dans /home/archives et sur le ftp. une idée d'ou ça peut venir ?

    - J'aimerai pouvoir sauvegardé /var/www, /home et /etc mais j'aimerai pouvoir exclure plusieurs dossiers dans /home/user, j'ai essayé de blacklister les dossiers, mais sans résultats visiblement. Y'a une solution ?
    Moi j ai réussi genre il sauvegarde /home mais pas les /home/*/torrents

    Je te linkerais la conf plus tard en édit de ce post

    moi j'ai ca, et ca fonctionne bien
    # Paths without spaces in their name:
    export BM_TARBALL_DIRECTORIES="/etc /var/www /home"
    
    # 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 /home/*/torrents /home/*/sickrage /home/backup"
    
    arckosfr wrote:Moi j ai réussi genre il sauvegarde /home mais pas les /home/*/torrents

    Je te linkerais la conf plus tard en édit de ce post

    moi j'ai ca, et ca fonctionne bien
    # Paths without spaces in their name:
    export BM_TARBALL_DIRECTORIES="/etc /var/www /home"
    
    # 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 /home/*/torrents /home/*/sickrage /home/backup"
    
    J'avais dû me rater sur quelque chose, la sauvegarde fonctionne comme je veux dorénavant. J'ai juste le message d'erreur a la fin, mais ca n'a pas l'air de poser de soucis