Skip to content
View in the app

A better way to browse. Learn more.

Gear Crushers

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

simple backup script

Featured Replies

Here is the script

backup.sh

#!/bin/bash

#Created by Dennis Hosang 20130812
#day of week variable
DOW=$(date +%A)

#username variable
USERNAME="netadm1n"

#hostname variable
HOST=$(hostname|cut -f1 -d.)

#backup /home
sudo rsync --delete -azvv --exclude-from '/backups/home_exclude' --log-file=/backups/${DOW}/rsync_log /home/ 10.6.56.244:/backups/${HOST}/${DOW}/home/

#backup /boot
sudo rsync --delete -azvv --log-file=/backups/${DOW}/rsync_log /boot/ 10.6.56.244:/backups/${HOST}/${DOW}/boot/

#empty trash
rm -rf /home/${USERNAME}/.local/share/Trash/Files/*

#backup /root
sudo rsync -avz --delete --exclude-from '/backups/root_exclude' --log-file=/backups/${DOW}/rsync_log / 10.6.56.244:/backups/${HOST}/${DOW}/root/

#backup /home
#sudo rsync --delete -azvv --exclude-from '/backups/home_exclude' --log-file=/backups/${DOW}/rsync_log /home/ 10.6.56.244:/backups/${HOST}/${DOW}/home/

Just added it to my crontab

# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user  command
#
37 14 * * * root sh /backups/backup.sh

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.