debian_common

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
debian_common [2024/03/12 07:49] โ€“ [Watchlist for backup] Jรบne Parkdebian_common [2024/03/19 11:25] โ€“ [Watchlist for backup] Jรบne Park
Line 36: Line 36:
 <code bash>  <code bash> 
 /etc/nginx/sites-available/ /etc/nginx/sites-available/
-/var/www/+/var/www/*ย 
 +/etc/transmission-daemon/  ย 
 +/opt/scripts/ 
 </code> </code>
 +**MariaDB** ''per DATABASE''
 +=== Backup MariaDB DATABASE === 
 +
 +<code bash> 
 +/usr/bin/mysqldump --single-transaction -h localhost -u root -p[database_passwd] [database_name] > /..(path)../.backup/[database_name]-sqlbkp_`date +"%Y%m%d"`.bak
 +</code> 
 +
 +**update-motd** 
 +<code bash>
 +/etc/update-motd.d/
 +</code>
 +
 +**crontab** 
 +<code bash> 
 +sudo crontab -l 
 +sudo -u www-data crontab -l 
 +crontab -l 
 +</code>
 +
 +
 +---- 
 +
 +----
 +=== Backup using rsync command === 
  
 == Backup Nginx configuration files ==  == Backup Nginx configuration files == 
Line 59: Line 85:
 </code>  </code> 
  
 +----
 ==== Purge log files ====  ==== Purge log files ==== 
  
Line 65: Line 92:
 sudo find /var/log -name '*.gz' -exec rm {} \; sudo find /var/log -name '*.gz' -exec rm {} \;
 </code>  </code> 
 +
 +----
  
 ==== Enable SSH ====  ==== Enable SSH ==== 
Line 111: Line 140:
 </code> </code>
    
 +=== Time stamp prompt === 
 +
 +Edit ''~/.bashrc'' and change ''PS1'' line 
 +
 +<code bash> 
 +if [ "$color_prompt" = yes ]; then
 +    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]: \[\033[01;33m\]\D{%T}\[\033[00m\] \[\033[01;37m\]\w\$\[\033[00m\] '
 +else
 +    PS1='${debian_chroot:+($debian_chroot)}\u@\h: \D{%T} \w\$ '
 +fi
 +</code> 
 +
 +Save and load ''.bashrc'' 
 +
 +<code bash> 
 +source ~/.bashrc 
 +</code> 
 +
  
 ---- ----
  • debian_common
  • Last modified: 2024/04/18 08:58
  • by Jรบne Park