Refactor web_scan.py for improved readability and maintainability; add cron job script for npm log backups; update start.ps1 for consistent formatting.
This commit is contained in:
1 parent
0d1cd21468
commit
c2eba88ac8
113 files changed
+772606
-772579
No files matched your search
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
# Shell script to be run as cron job to copy npm logs to backup location.
|
||||
|
||||
# Stop npm service to ensure logs are not being written to while copying.
|
||||
systemctl stop npm
|
||||
|
||||
# Only copy new/changed log files to avoid re-copying existing backups.
|
||||
# --ignore-existing: never overwrite files already present in the destination.
|
||||
# -c: compare files by checksum so matching files are not re-written.
|
||||
# -P: preserve permissions + show progress.
|
||||
rsync -qcP --ignore-existing /data/logs/*access* /data/logs/*error* /mnt/backups/npm/
|
||||
|
||||
# Start npm service again after copying logs.
|
||||
systemctl start npm
|
||||
Reference in new issue
Block a user