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 07/06/2007, à 18:20

Gounlaf

[Backup-Manager] Exclure les dossier cachés

Bonsoir tout le monde,
j'aimerais savoir comment exclure les dossier cachés d'un backup ...
'fin, je m'explique :

d'abord, j'ai testé sur un dossier "test"

/home/moi/test/
/home/moi/test/dossier/truc.txt
/home/moi/test/.dossier_cache/truc.txt

Je demande la sauvegarde de /home/moi/test/
J'exclu /home/moi/test/.*

=> Ca fonctionne

Alors, après, je test sur mon home

Je demande la sauvegarde de /home/moi/
J'exclu /home/moi/.*


=> Ba la, le script me sort une erreur de syntax ... pourtant, j'ai descendu ma sauvegarde d'un niveau, c'est tout :s


Je ne comprend pas pourquoi ... si quelqu'un à une idée, merci d'avance.

Hors ligne

#2 Le 09/06/2007, à 15:06

alteo_gange

Re : [Backup-Manager] Exclure les dossier cachés

Gounlaf a écrit :

Je ne comprend pas pourquoi.

Moi non plus Ce n'est pas évident de t'aider sans un aperçu du script.

Sinon rsync permet de faire des sauvegardes en excluant certains dossiers.

Hors ligne

#3 Le 09/06/2007, à 17:01

Gounlaf

Re : [Backup-Manager] Exclure les dossier cachés

J'ai splitté tout ce qui servait à rien pour l'explication

export BM_TARBALL_DIRECTORIES="/var/www /home/gounlaf"
export BM_TARBALL_BLACKLIST="/dev /sys /proc /tmp /home/gounlaf/.*"

Premiere variable : ce qu'on veut sauvegarder
2nd var : ceux qu'on veut exclure.
Et, ba, ca fonctionne pas ...

Donc, j'ai fait un test, avec un dossier test ...
Les dossier/fichier avait donc cette architecture

/home/moi/test/
/home/moi/test/dossier/truc.txt
/home/moi/test/.dossier_cache/truc.txt

Et donc, au niveau du script

export BM_TARBALL_DIRECTORIES="/var/www /home/gounlaf/test"
export BM_TARBALL_BLACKLIST="/dev /sys /proc /tmp /home/gounlaf/test/.*"

Et là, ca marche ...
Donc ca aurait du marcher pour tout mon home (mon dossier "gounlaf" quoi ...). Ba non =/

Hors ligne

#4 Le 10/06/2007, à 23:55

alteo_gange

Re : [Backup-Manager] Exclure les dossier cachés

Gounlaf a écrit :

export BM_TARBALL_DIRECTORIES="/var/www /home/gounlaf"
export BM_TARBALL_BLACKLIST="/dev /sys /proc /tmp /home/gounlaf/.*"

/home/moi/test/
/home/moi/test/dossier/truc.txt
/home/moi/test/.dossier_cache/truc.txt
Et donc, au niveau du script

export BM_TARBALL_DIRECTORIES="/var/www /home/gounlaf/test"
export BM_TARBALL_BLACKLIST="/dev /sys /proc /tmp /home/gounlaf/test/.*"

J'ai 2 hypothèses:
- tu avais prévu de ne pas aller voter dimanche et la providence te punit;
- /home/gounlaf/ contient des dossiers et fichiers cachés alors que /home/moi/test/ ne contient qu'un dossier caché. Or la variable BM_TARBALL_BLACKLIST ne supporterait que des dossiers (ou alors qu'un seul dossier à la fois).

Sinon il faut vérifier les permissions des dossiers ou fichiers.

Hors ligne

#5 Le 11/06/2007, à 06:58

Gounlaf

Re : [Backup-Manager] Exclure les dossier cachés

/home/gounlaf/test/ n'en contient qu'un
et mon /home/gounlaf/ contient tout les dossier de config, etc ...

Hors ligne

#6 Le 11/06/2007, à 10:47

alteo_gange

Re : [Backup-Manager] Exclure les dossier cachés

Quel est ta commande pour copier?

Hors ligne

#7 Le 11/06/2007, à 11:01

Gounlaf

Re : [Backup-Manager] Exclure les dossier cachés

J'ai rien à "copier"
Ya juste à executer backup-manger ...
Et toute la configuration est dans un /etc/backup-manager.conf, avec des "export BM...."

#  Backup Manager Configuration File
#
#  * This configuration file is divided into sections.
#    The 'global' section is mandatory, every keys defined in 
#    this section are inherited in the other sections.
#  * There is one section per "backup method", you have to 
#    fill the section of the chosen method.
#
##############################################################

##############################################################
# Repository - everything about where archives are
#############################################################

# Where to store the archives
export BM_REPOSITORY_ROOT="/media/Backup/the_backup"

# For security reasons, the archive repository and the generated 
# archives will be readable/writable by a given user/group.
# This is recommended to set this to true.
export BM_REPOSITORY_SECURE="true"

# The repository will be readable/writable only by a specific 
# user:group pair if BM_REPOSITORY_SECURE is set to true.
export BM_REPOSITORY_USER="gounlaf"
export BM_REPOSITORY_GROUP="root"
# You can also choose the permission to set the repository, default 
# is 770, pay attention to what you do there!
export BM_REPOSITORY_CHMOD="777"

##############################################################
# Archives - let's focus on the precious tarballs...
##############################################################

# Each archive generated will be chmoded for security reasons
# (BM_REPOSITORY_SECURE should be enabled for this).
export BM_ARCHIVE_CHMOD="777"

# Number of days we have to keep an archive (Time To Live)
export BM_ARCHIVE_TTL="30"

# Do you want to purge only the top-level directory or all
# directories under BM_REPOSITORY_ROOT?
export BM_REPOSITORY_RECURSIVEPURGE="false"

# Do you want to replace duplicates by symlinks? 
# (archive-DAY is a duplicate of archive-(DAY - 1) if they 
# are both the same according to MD5 hashes).
export BM_ARCHIVE_PURGEDUPS="true"

# Prefix of every archive on that box (default is HOSTNAME)
export BM_ARCHIVE_PREFIX="$HOSTNAME"

# Should we purge only archives built with $BM_ARCHIVE_PREFIX
export BM_ARCHIVE_STRICTPURGE="true"

# The backup method to use.
# Available methods are:
# - tarball
# - tarball-incremental
# - mysql
# - svn
# - pipe
# - none
# If you don't want to use any backup method (you don't want to
# build archives) then choose "none"
export BM_ARCHIVE_METHOD="tarball"

##############################################################
# Encryption - because you cannot trust the place your 
#              archives are
##############################################################

# If you want to encrypt your archives locally, Backup Manager 
# can use GPG while building the archive (so the archive is never
# written to the disk without being encrypted.

# Note: this feature is only possible with the following archive types:
# tar, tar.gz, tar.bz2

# Uncomment the following line if you want to enable encryption
# export BM_ENCRYPTION_METHOD="gpg"

# The encryption will be made using a GPG ID
# Examples:
# export BM_ENCRYPTION_RECIPIENT="0x1EE5DD34"
# export BM_ENCRYPTION_RECIPIENT="Alexis Sukrieh"
# export BM_ENCRYPTION_RECIPIENT="sukria@sukria.net"


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

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

# 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.bz2"

# 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.

# Paths without spaces in their name:
# export BM_TARBALL_DIRECTORIES="/etc /boot"
export BM_TARBALL_DIRECTORIES="/var/www /home/gounlaf"

# 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="/dev /sys /proc /tmp /home/gounlaf/.*"

# 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=""

##############################################################
# The tarball-incremental method uses the same keys as the 
# tarball method, plus two others.
#############################################################

# Which frequency to use for the master tarball?
# possible values: weekly, monthly
export BM_TARBALLINC_MASTERDATETYPE="weekly"

# Number of the day, in the BM_TARBALLINC_MASTERDATETYPE frequency
# when master tarballs should be made
export BM_TARBALLINC_MASTERDATEVALUE="1"

# Examples: you want to make master tarballs every friday:
# BM_TARBALLINC_MASTERDATETYPE="weekly"
# BM_TARBALLINC_MASTERDATEVALUE="5"
#
# Or every first day of the month:
# BM_TARBALLINC_MASTERDATETYPE="monthly"
# BM_TARBALLINC_MASTERDATEVALUE="1"

##############################################################
# Backup method: MYSQl
#############################################################

# This method is dedicated to MySQL databases.
# You should not use the tarball method for backing up database
# directories or you may have corrupted archives.
# Enter here the list of databases to backup.
# Wildcard: __ALL__ (will dump all the databases in one archive)
export BM_MYSQL_DATABASES="__ALL__"

# The best way to produce MySQL dump is done by using the "--opt" switch 
# of mysqldump. This make the dump directly usable with mysql (add the drop table
# statements), lock the tables during the dump and other things.
# This is recommended for full-clean-safe backups, but needs a 
# privileged user (for the lock permissions).
export BM_MYSQL_SAFEDUMPS="true"

# The user who is allowed to read every databases filled in BM_MYSQL_DATABASES
export BM_MYSQL_ADMINLOGIN="root"

# its password
export BM_MYSQL_ADMINPASS=""

# the host where the database is
export BM_MYSQL_HOST="localhost"

# the port where MySQL listen to on the host
export BM_MYSQL_PORT="3306"

# which compression format to use? (gzip or bzip2)
export BM_MYSQL_FILETYPE="bzip2"

##############################################################
# Backup method: svn
#############################################################

# Absolute paths to the svn repositories to archive
export BM_SVN_REPOSITORIES=""

# You can compress the resulting XML files 
# Supported compressor are: bzip2 and gzip
export BM_SVN_COMPRESSWITH="bzip2"

##############################################################
# Backup method: pipe
#############################################################

# The "pipe" method is a generic way of making archive.
# Its concept is simple, for every kind of archive you want
# to make, you give: a command which will send output on stdout,
# a name, a file type and optionnaly, a compressor. 

# Be careful, this feature uses arrays!
declare -a BM_PIPE_COMMAND
declare -a BM_PIPE_NAME
declare -a BM_PIPE_FILETYPE
declare -a BM_PIPE_COMPRESS

# You can virtually implement whatever backup scenario you like 
# with this method.
#
# The resulting archives will be named like this: 
# $BM_ARCHIVE_PREFIX-$BM_PIPE_NAME.$DATE.$BM_PIPE_FILETYPE
# If you specified a BM_PIPE_COMPRESS option, the resulting filename 
# will change as expected (eg, .gz if "gzip").
#
# Here are a couple of examples for using this method:

# Archive a remote MySQL database through SSH:
#    BM_PIPE_COMMAND[0]="ssh host -c \"mysqldump -ufoo -pbar base\"" 
#    BM_PIPE_NAME[0]="base" 
#    BM_PIPE_FILETYPE[0]="sql"
#    BM_PIPE_COMPRESS[0]="gzip"
# This will make somthing like: localhost-base.20050421.sql.gz

# Archive a specific directory, on a remote server through SSH:
#    BM_PIPE_COMMAND[0]="ssh host -c \"tar -c -z /home/user\"" 
#    BM_PIPE_NAME[0]="host.home.user" 
#    BM_PIPE_FILETYPE[0]="tar.gz"
#    BM_PIPE_COMPRESS[0]=""
# This will make somthing like: localhost-host.home.user.20050421.tar.gz

export BM_PIPE_COMMAND
export BM_PIPE_NAME
export BM_PIPE_FILETYPE
export BM_PIPE_COMPRESS

##############################################################
# Section "UPLOAD"
# You can upload archives to remote hosts with different 
# methods.
#############################################################

# Which method to use for uploading archives, you can put 
# multiple methods here.
# Available methods:
# - scp
# - ssh-gpg
# - ftp
# - rsync
# - s3
# - none

# If you don't want to use any upload method (you don't want to
# upload files to remote hosts) then choose "none"
export BM_UPLOAD_METHOD=""

# where to upload (global to all methods. Not required to be set for S3)
export BM_UPLOAD_HOSTS=""

# Where to put archives on the remote hosts (global)
export BM_UPLOAD_DESTINATION=""

##############################################################
# The SSH method
#############################################################

# the user to use for the SSH connections/transfers
export BM_UPLOAD_SSH_USER=""

# The private key to use for opening the connection
export BM_UPLOAD_SSH_KEY=""

# specific ssh hosts 
export BM_UPLOAD_SSH_HOSTS=""

# port to use for SSH connections (leave blank for default one)
export BM_UPLOAD_SSH_PORT=""

# destination for ssh uploads (overrides BM_UPLOAD_DESTINATION)
export BM_UPLOAD_SSH_DESTINATION=""

# purge archives on remote hosts before uploading?
export BM_UPLOAD_SSH_PURGE="true"

# If you set BM_UPLOAD_SSH_PURGE, you can specify a time to live 
# for archives uploaded with SSH.
# This can let you use different ttl's locally and remotely
# By default, BM_ARCHIVE_TTL will be used.
export BM_UPLOAD_SSH_TTL=""

##############################################################
# The SSH-GPG method
# The ssh-gpg method uses the same configuration keys as the 
# ssh method, plus one other
#############################################################

# The gpg public key used for encryption, this can be a short 
# or long key id, or a descriptive name. See gpg man page for 
# all possibilities how to specify a key.
export BM_UPLOAD_SSHGPG_RECIPIENT=""

##############################################################
# The FTP method
#############################################################

# Use FTP secured transfers (FTP over TLS)
# User, password and data will be uploaded encrypted with SSL.
# Passive mode will be automaticaly activated
export BM_UPLOAD_FTP_SECURE="false"

# Do you want to use FTP passive mode?
# This is mandatory for NATed/firewalled environments 
export BM_UPLOAD_FTP_PASSIVE="true"

# the user to use for the FTP connections/transfers
export BM_UPLOAD_FTP_USER=""

# the FTP user's password
export BM_UPLOAD_FTP_PASSWORD=""

# FTP specific remote hosts
export BM_UPLOAD_FTP_HOSTS=""

# purge archives on remote hosts before uploading?
export BM_UPLOAD_FTP_PURGE="true"

# You can specify a time to live for archives uploaded with FTP
# This can let you use different ttl's locally and remotely
# By default, BM_ARCHIVE_TTL will be used.
export BM_UPLOAD_FTP_TTL=""

# destination for FTP uploads (overrides BM_UPLOAD_DESTINATION)
export BM_UPLOAD_FTP_DESTINATION=""


##############################################################
# The S3 method
#############################################################

# The Amazon S3 method requires that you secure an S3
# account. See http://aws.amazon.com

# The bucket to upload to. This bucket must be dedicated to backup-manager
export BM_UPLOAD_S3_DESTINATION=""

# the S3 access key provided to you
export BM_UPLOAD_S3_ACCESS_KEY=""

# the S3 secret key provided to you
export BM_UPLOAD_S3_SECRET_KEY=""

# purge archives on remote hosts before uploading?
export BM_UPLOAD_S3_PURGE="false"

##############################################################
# The RSYNC method
#############################################################

# Which directories should be backuped with rsync
export BM_UPLOAD_RSYNC_DIRECTORIES=""

# Destination for rsync uploads (overrides BM_UPLOAD_DESTINATION) 
export BM_UPLOAD_RSYNC_DESTINATION=""

# The list of remote hosts, if you want to enable the upload
# system, just put some remote hosts here (fqdn or IPs)
# Leave it empty if you want to use the hosts that are defined in
# BM_UPLOAD_HOSTS
export BM_UPLOAD_RSYNC_HOSTS=""

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

##############################################################
# Section "BURNING" 
# - Automatic CDR/CDRW/DVDR burning
#############################################################

# the method of burning archives from the list :
#  - DVD    : burn archives on a DVD medium
#             (that doesn't need formatting, like DVD+RW).
#
#  - DVD-RW : blank the DVD medium and burn archives 
#             (recommanded for DVD-RW media).
#
#  - CDRW   : blank the CDRW and burn the whole 
#             ARCHIVES_REPOSITORY or only 
#             the generated archives.
#
#  - CDR    : burn the whole ARCHIVES_REPOSITORY or 
#             only the generated archives.
#  - none   : disable the burning system

export BM_BURNING_METHOD="none"

# When the CD is burnt, it is possible to check every file's 
# MD5 checksum to see if the CD is not corrupted.
export BM_BURNING_CHKMD5="false"

# The device to use for mounting the cdrom
export BM_BURNING_DEVICE="/dev/cdrom"

# You can force cdrecord to use a specific device
# Fill in the full path to the device to use or even
# e.g. BM_BURNING_DEVFORCED="/dev/cdrom"
# If none specified, the default cdrecord device will be used.
export BM_BURNING_DEVFORCED=""

# By default backup-manager will make Joliet media (using the mkisofs switches
# : "-R -J"). You can change these if you want to use non-Joliet disc images.
# Change this only if you know what you're doing. Refer to mkisofs(8) for
# details.
export BM_BURNING_ISO_FLAGS="-R -J"

# enter here the max size of your media 
# (usal sizes are 4200 for DVD media and 700 or 800 for CDR media)
export BM_BURNING_MAXSIZE="650"


##############################################################
# Advanced settings, use this with care.
#############################################################

# Every output made can be sent to syslog
# set this to "true" or "false"
export BM_LOGGER="true"

# You can choose which facility to use
export BM_LOGGER_FACILITY="user"

# Enter here some shell script.
# It will be executed before the first action of backup-manager.
export BM_PRE_BACKUP_COMMAND=""

# Enter here some shell script.
# It will be executed after the last action of backup-manager.
export BM_POST_BACKUP_COMMAND=""

Ca c'est ma config complète


J'ai lut http://doc.ubuntu-fr.org/backup-manager ca avant ...

Hors ligne

#8 Le 11/06/2007, à 13:12

alteo_gange

Re : [Backup-Manager] Exclure les dossier cachés

Ca marche chez moi. Il était hors de question de faire une copie de /home/$USER vu sa taille alors j'ai fait un test comme toi. Le dossier à sauvegarder était /home/romain/back. Comme /home/$USER il contenait des dossiers et des fichiers cachés. Ils n'ont pas été sauvegardés par backup-manager.

Voici quelques éléments du fichier de configuration:

# Where to store the archives
export BM_REPOSITORY_ROOT="/home/romain/back_root"
# The repository will be readable/writable only by a specific 
# user:group pair if BM_REPOSITORY_SECURE is set to true.
export BM_REPOSITORY_USER="romain"
export BM_REPOSITORY_GROUP="romain"

# Directories you want to backup as tarballs (separated by spaces)
export BM_TARBALL_DIRECTORIES="/home/romain/back"
# Files to exclude when generating tarballs
export BM_TARBALL_BLACKLIST="/home/romain/back/.*"

Tu remarqueras que BM_REPOSITORY_USER a la même valeur que BM_REPOSITORY_GROUP; BM_TARBALL_BLACKLIST ne contient que des sous-répertoires ou des sous-fichiers de BM_TARBALL_DIRECTORIES (pas de /proc ... c'est inutile); le fichier de configuration ne contient aucune référence aux permissions (ligne avec 770 ou 777...).


romain@ubuntu:~/back_root$ ls -al ~/back
total 32
drwxr-xr-x  4 romain romain 4096 2007-06-11 12:58 .
drwxr-xr-x 72 romain romain 8192 2007-06-11 12:58 ..
drwxr-xr-x  2 romain romain 4096 2007-06-11 12:43 .deux
-rw-r--r--  1 romain romain  142 2007-06-11 12:04 essai
-rw-r--r--  1 romain romain    5 2007-06-11 12:44 .fichier1
-rw-r--r--  1 romain romain    4 2007-06-11 12:58 .fichier2
drwxr-xr-x  2 romain romain 4096 2007-06-11 11:56 .un

romain@ubuntu:~/back_root$ sudo backup-manager -v
Demande de verrou pour backup-manager, 15875 avec /etc/backup-manager.conf
Nettoyage de /home/romain/back_root
Utilisation de la méthode « tarball ».
/home/romain/back_root/ubuntu-home-romain-back.20070611.tar.gz : OK (1 Mo, 0774c2c6ad668ee1503477cf1f206227)
Aucune méthode de gravure utilisé

romain@ubuntu:~/back_root$ tarz ubuntu-home-romain-back.20070611.tar.gz
home/romain/back/
home/romain/back/essai

L'option -v permet d'activer le mode verbeux.

Dernière modification par alteo_gange (Le 11/06/2007, à 13:13)

Hors ligne

#9 Le 11/06/2007, à 13:48

Gounlaf

Re : [Backup-Manager] Exclure les dossier cachés

Oui, et, comme toi, comme ca marchait pour un test, j'ai voulu sauvegarder mon home, SANS les dossier de config ... donc j'ai descendu d'un cran, et au lieu de "/home/romain/back_root" et "/home/romain/back/.*" ba j'ai fait mon home, sans les fichier de config ... et ca ne fonctionne pas roll

Hors ligne

#10 Le 11/06/2007, à 14:07

alteo_gange

Re : [Backup-Manager] Exclure les dossier cachés

En tout cas ces 2 lignes me laissent dubitatif:

export BM_REPOSITORY_USER="root"
export BM_REPOSITORY_GROUP="gounlaf"

L'utilisateur gounlaf appartiendrait au groupe root? J'en doute fortement.

Je t'ai parlé du mode verbeux, donc ça aurait été pas mal que tu cites les lignes renvoyées par le shell durant le lancement de "sudo backup-manager -v". Ainsi tu pourrais connaître exactement la nature de l'erreur.

Enfin essaie un 'ls -l' (ou 'ls -al') et regarde les différences de la nature des fichiers/répertoires par rapport à ton test:
- utilisateur, groupe;
- permission en lecture, écriture, exécution/ouverture (fichier/dossier)

La version dapper de backup-manager ne gère pas les permissions. Cela peut éviter des erreurs de ce type.

Hors ligne

#11 Le 11/06/2007, à 14:32

Gounlaf

Re : [Backup-Manager] Exclure les dossier cachés

Ouep, jva reesayer smile

export BM_REPOSITORY_USER="gounlaf"
export BM_REPOSITORY_GROUP="root"
export BM_TARBALL_DIRECTORIES="/var/www /home/gounlaf"
export BM_TARBALL_BLACKLIST="/dev /sys /proc /tmp /home/gounlaf/.*"

=>

Utilisation de la méthode « tarball ».
expr: erreur de syntaxe

...
Donc il me backup que www, mais pas gounlaf hmm

Edit : Plus précisément :

export BM_REPOSITORY_USER="gounlaf"
export BM_REPOSITORY_GROUP="root"
export BM_TARBALL_DIRECTORIES="/home/gounlaf"
export BM_TARBALL_BLACKLIST="/dev /sys /proc /tmp /home/gounlaf/.*"

=> Comme ca, on va s'occuper d'abord des pbms liés a mon home

14:34 gounlaf@c3x ~% sudo backup-manager -v             
Backup Manager 0.7.6 - Copyright (c) 2004-2007 Alexis Sukrieh
Demande de verrou pour backup-manager, 14867 avec /etc/backup-manager.conf
Nettoyage de /media/Backup/the_backup
Utilisation de la méthode « tarball ».
expr: erreur de syntaxe

=> Il est en train de me backup tout mon home (fin, yen a pour un moment, donc bon ... mais, je suis quasi sur que meme les cachés il va me les backup)

Dernière modification par Gounlaf (Le 11/06/2007, à 14:36)

Hors ligne

#12 Le 11/06/2007, à 16:06

alteo_gange

Re : [Backup-Manager] Exclure les dossier cachés

L'erreur de syntaxe est plutôt vague. D'habitude les rapport d'erreurs sont précis.

Gounlaf a écrit :

=> Il est en train de me backup tout mon home (fin, yen a pour un moment, donc bon ... mais, je suis quasi sur que meme les cachés il va me les backup)

N'oublie pas que les fichiers ou dossiers sauvegardés sont listés à la fin de la procédure. Donc tu ne seras pas obligé de décompresser une archive très volumineuse pour vérifier que les ~/.* n'ont pas été sauvés. Si ta sauvegarde est longue, c'est peut-être parce que la compression en tar.bz2 est forte.

Backup-manager a l'air relativement simple à configurer (quand ça marche :-) ) mais on est obligé de passer par une archive. Donc je testerai plutôt rsync quand j'aurais la possibilité de sauvegarder via un autre disque dur.

Hors ligne

#13 Le 11/06/2007, à 17:13

Gounlaf

Re : [Backup-Manager] Exclure les dossier cachés

Plop : bon, ca a planté ...
Jvais essayé avec la stable hmm

Hors ligne

#14 Le 11/06/2007, à 17:47

Gounlaf

Re : [Backup-Manager] Exclure les dossier cachés

17:27 gounlaf@c3x ~% sudo backup-manager -v
Demande de verrou pour backup-manager, 27144 avec /etc/backup-manager.conf
Nettoyage de /media/Backup/the_backup
Using method "tarball"
Impossible de créer /media/Backup/the_backup/c3x-home-gounlaf.20070611.tar.gz, voir /tmp/bm-tar.log.G27907 pour les détails.

Attention, interruption utilisateur. Les archives risquent d'être corrompues.
Libération du verrou.

Je crois que ext3 gere pas les fichiers de plus de 4Go (ca s'est arrété la, avec la version dev, et avec celle la xD)

Bon ba, jva changer de méthode alors big_smile


Edit : je ne suis quand meme pas fou ...

2.2.1.9 BM_TARBALL_BLACKLIST

Type: space-separated list, default: "/proc /dev /sys /tmp".

It can be very useful to prevent some locations of your filesytem from being included in the archives. This is really useful when you use wildcards in BM_TARBALL_DIRECTORIES. Indeed, you may want to backup every top-level directory of your filesystem (/*) but without volatile locations like /tmp, /dev and /proc.

You can also use this variable for excluding every files of a given extension, like for instance mp3 or mpg files.

Example:

     export BM_TARBALL_BLACKLIST="/tmp /dev /proc *.mp3 *.mpg"

=>

export BM_TARBALL_BLACKLIST="/dev /sys /proc /tmp .*"

=>

expr: erreur de syntaxe

Et donc ca prend tout mon home ... j'en ai marre hmm

Dernière modification par Gounlaf (Le 11/06/2007, à 18:11)

Hors ligne

#15 Le 02/08/2007, à 15:44

krokodil

Re : [Backup-Manager] Exclure les dossier cachés

Ne serait-ce pas par hasard le fait de spécifier dans ta commande :

/home/.*

Pour rappel le caractère générique " * " correspond a tout.

Non seulement tous les fichiers cachés (.ssh par exemple) mais aussi le fichier ".." que tu connais bien dans la commande "cd .."

D'ou ton erreur de syntax.
ceci dit tu t'en sort bien, j'en connais qui se souviennent de leur magistral "rm -rf .*" pour supprimer les fichiers cachés....Erreur de débutant, qui peu couter cher.


http://www.tem-la-firme.com/?card=40634

Hors ligne