Ver a proveniência

exclude oldlog initial copy

pull/68/head
StuartIanNaylor há 5 anos
ascendente
cometimento
36eb255583
2 ficheiros alterados com 6 adições e 1 eliminações
  1. +3
    -1
      install.sh
  2. +3
    -0
      log2ram

+ 3
- 1
install.sh Ver ficheiro

@@ -35,7 +35,9 @@ rm -r /var/log/*.old
# Clone /var/log
mkdir -p /var/hdd.log
mkdir -p /var/log/oldlog
cp -rfup /var/log/ -T /var/hdd.log/
# Prob better to use xcopy here with a --exclude
rsync -a --exclude 'oldlog' /var/log/ /var/hdd.log/
#cp -rfup /var/log/ -T /var/hdd.log/
sed -i '/^include.*/i olddir /var/log/oldlog' /etc/logrotate.conf

echo "##### Reboot to activate log2ram #####"


+ 3
- 0
log2ram Ver ficheiro

@@ -18,6 +18,8 @@ syncToDisk () {
isSafe

if [ "$USE_RSYNC" = true ]; then
# sort of confused as -a, --archive archive mode; equals -rlptgoD (no -H,-A,-X)
# rsync -a $RAM_LOG/ $HDD_LOG/ 2>&1 | $LOG_OUTPUT ?
rsync -aXWv --delete --links $RAM_LOG/ $HDD_LOG/ 2>&1 | $LOG_OUTPUT
else
cp -rfup $RAM_LOG/ -T $HDD_LOG/ 2>&1 | $LOG_OUTPUT
@@ -38,6 +40,7 @@ syncFromDisk () {
fi

if [ "$USE_RSYNC" = true ]; then
# again ?
rsync -aXWv --delete --links $HDD_LOG/ $RAM_LOG/ 2>&1 | $LOG_OUTPUT
else
cp -rfup $HDD_LOG/ -T $RAM_LOG/ 2>&1 | $LOG_OUTPUT


Carregando…
Cancelar
Guardar