Bladeren bron

exclude oldlog initial copy

pull/68/head
StuartIanNaylor 5 jaren geleden
bovenliggende
commit
36eb255583
2 gewijzigde bestanden met toevoegingen van 6 en 1 verwijderingen
  1. +3
    -1
      install.sh
  2. +3
    -0
      log2ram

+ 3
- 1
install.sh Bestand weergeven

@@ -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 Bestand weergeven

@@ -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


Laden…
Annuleren
Opslaan