server-tools !?!
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

pirms 4 gadiem
1234567891011121314151617
  1. #!/bin/bash
  2. # Variables
  3. BACKUP_ROOT_FILES="/backup/files"
  4. BACKUP_FILES_RETENTION=10
  5. # Starting backup
  6. echo "Starting files backup process ..."
  7. # Backup server configuration
  8. mkdir -p ${BACKUP_ROOT_FILES}
  9. HOUR=`date +%Y%m%d%H%M`
  10. tar czf ${BACKUP_ROOT_FILES}/files_${HOUR}.tar.gz /etc
  11. # Purge old backup
  12. echo "Starting files purge process for backup older than ${BACKUP_PRODUCTS_RETENTION} ..."
  13. find ${BACKUP_ROOT_FILES} -type f -mtime +${BACKUP_FILES_RETENTION} -exec rm -f {} \;