Jump to content
XPEnology Community

Search the Community

Showing results for tags 'log center'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Information
    • Readers News & Rumours
    • Information and Feedback
    • The Noob Lounge
  • XPEnology Project
    • F.A.Q - START HERE
    • Loader Releases & Extras
    • DSM Updates Reporting
    • Developer Discussion Room
    • Tutorials and Guides
    • DSM Installation
    • DSM Post-Installation
    • Packages & DSM Features
    • General Questions
    • Hardware Modding
    • Software Modding
    • Miscellaneous
  • International
    • РУССКИЙ
    • FRANÇAIS
    • GERMAN
    • SPANISH
    • ITALIAN
    • KOREAN

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me

Found 1 result

  1. SQLITE3 is already built into Synology. And, in order to use this function, you need to install the advanced log center function in the package manager once more to set up the log center archive. This is an example of sending a remote shutdown command after completing shared folder synchronization. Saves the results of the successful processing of shared folder synchronization to a DB file through the Log Center. And then we're going to use SQLITE3 built-in synology to re-Script to check. Once a normal BACKUP has been verified, the remote NAS server can be shut down via the SSH command. The method is to create a storage destination for archiving settings in Log Center to storage destinations for archive Select the appropriate folder (in my case, /volume2/log , It could also be /volume1/log ) to download log db files. Archives local logs to the storage location specified above [V]. Check the and apply it. This DB file is for SQL LITE, running sqlite3 shown in the command below, and opening the DB file specified above as an archive. And you can know the result with a query that SELECT count the successful processing of normal synchronization today. If the value 1 is printed on the r variable, it means that the normal performance is completed, and the backup is only done once a day. If you have more backups, you should modify the queries and IF conditions in the script below. In the synology, create a shell script in the shell folder using the vi editor as shown below. vi /volume2/shell/poweroff_af_backup.sh #!/bin/bash r=$(sqlite3 /volume2/log/SYNOSYSLOGDB__LOCALARCH.DB "select count(*) as cnt from logs a where host = ‘MAIN NAS' and ldate = date('now','localtime') and prog = 'NetworkBackup' and instr(msg,'Shared Folder Sync finished to sync task') > 0;") echo $r if [ $r -eq "0" ] ; then echo “Shared folder sync error or Not Complete” else echo "End backup normally, shutting down BACKUP NAS " ssh -p 32022 admin@192.168.35.11 sudo "poweroff" fi To automatically shut down the remote server with Wish, a copy of the pub key generation via ssh-keygen is required. For this part, please refer to the link below. https://www.synoforum.com/threads/how-to-log-in-without-ssh-password-how-to-log-in-without-password.6111/ The completed script can be registered with the work schedule, given the appropriate frequency, and checked continuously so that the remote server can be shut down if the backup succeeds. Thank you.
×
×
  • Create New...