3 PACMAN_LOCAL
="/var/lib/pacman/local"
4 BACKUP_DIR
="/var/backups/pacman_local_database"
6 # backup local database
7 [[ ! -d ${BACKUP_DIR} ]] && mkdir
-p ${BACKUP_DIR}
8 cp -a ${PACMAN_LOCAL} ${BACKUP_DIR}
11 cd ${BACKUP_DIR}; echo "$(date)" >> backup.log