My linux world » Security-commons Survival Guide

Security-commons Survival Guide


Security as a condition is the degree of resistance to, or protection from, harm. It applies to any vulnerable and valuable asset, such as a person, dwelling, community, nation, or organization. Establishing or maintaining a sufficient degree of security is the aim of the work, structures, and processes called “security.”

Wikipedia

Contents

Here are some best practice

For you server

For your applications

Backup your data

Mysql

Look here

Rsync

rsync -r -t -p -v -h -b --progress --delete --force --filter "- mydirectory1" --filter "- mydirectory2" --filter "- myFile1" --suffix .rsync-backup /etc/directoryToBackup/ /opt/backup

lftp (sync to a ftp server)

Create file.lftp:

# open connection:
open login:pwd@myftpserver
 
# syncronize with remote:
# directoryToSend : relative working directory path
# www/project : relative remote directory path to sync.
# Options are : 
#    -v       : verbose
#    -R       : Reverse (from working copy to remote)
#    -e       : remove missing files in remote
#  --no-perms : skip changing permissions
#  --exclude  : exclude pattern to sync.
#
mirror "/mylocal/directory" my/ftp/directory -v -R -e --no-perms --exclude .tmp
lftp -f ./file.lftp

sql server

echo install Node.js package manager
yum -y install npm
 
echo install Cross platform command line interface for SQL Server
npm install sql-cli

Now you can use it like this:

mssql --server myserver --user myuser --pass mypassword --database mydatabase

Read more https://www.npmjs.org/package/sql-cli


Copyright © 2023 My linux world - by Marc RABAHI
Design by Marc RABAHI and encelades.

Fork me on GitHub