Backing up every session

In my shack PC I have installed two hard drives.

/dev/sda is a 120 GB SSD

/dev/sdb is a 320 GB traditional platter HD

Disk /dev/sda: 111.8 GiB, 120034123776 bytes, 234441648 sectors
Disk model: CT120BX500SSD1  
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: E29FE639-9F17-4792-95B4-CB5638FDC0C1

Device        Start       End   Sectors  Size Type
/dev/sda1      2048  46942207  46940160 22.4G Linux filesystem
/dev/sda2  46942208  54753279   7811072  3.7G Linux swap
/dev/sda3  54753280 234440703 179687424 85.7G Linux filesystem

Disk /dev/sdb: 298.1 GiB, 320072933376 bytes, 625142448 sectors
Disk model: WDC WD3200BEVT-2
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 1848E24C-5B33-4360-A086-D681AD374C6C

Device         Start       End   Sectors   Size Type
/dev/sdb1       2048  46942207  46940160  22.4G Linux filesystem
/dev/sdb2   46942208  54747135   7804928   3.7G Linux swap
/dev/sdb3   54747136 234424319 179677184  85.7G Linux filesystem
/dev/sdb4  234424320 625141759 390717440 186.3G Linux filesystem

I use this bash script before I turn off my PC to back up everything to the second hard drive.

#!/bin/bash

#This script will mount partition one of the second hard drive, then use rsync to back up the root directory containing the OS. After that the partition will be unmounted.
sudo /usr/bin/mount /dev/sdb1 /mnt
sleep 1
sudo rsync -aAXv / --exclude={"/home/*","/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} /mnt
sleep 1
sudo /usr/bin/umount /mnt

#Same goes for this block of code, except that is will back up the home directory
sudo /usr/bin/mount /dev/sdb3 /mnt
sleep 1
sudo rsync -aAXv --exclude={".cache"} /home /mnt
sleep 1
sudo /usr/bin/umount /mnt

 

Adding satellites to Gpredict

Go to the following directory: /home/hans/.config/Gpredict/satdata/

Make a new text file with a high number, for example 45000.sat

Enter the following information in the file:

[Satellite]
VERSION=1.1
NAME=FOX-1B (AO-91)
NICKNAME=FOX-1B (AO-91)
TLE1=1 43017U 17073E   19164.72555590  .00000235  00000-0  23853-4 0  9997
TLE2=2 43017  97.7237  86.2811 0258323 174.2847 186.1416 14.78541632 84521
STATUS=0

Change the name, nickname and TLE1 and 2 to the desired satellite info. Save, then using the name you search for it in Gpredict.

Persistent USB devices

In order to make USB devices use a fixed entry point in /dev do the following:

  1. find the device with by issuing "dmesg" in a terminal window. Note down the vendor- and product info.
  2. go to /etc/udev/rules.d and make the following file: 99-usb.device.rules
  3. add the following content to this file: SUBSYSTEM=="tty", ATTRS{idVendor}=="xxxx", ATTRS{idProduct}=="xxxx", SYMLINK+="PTT", MODE:="0666"
  4. Now the device with the vendor- and product ID will have a persistent entry "PTT" in the /dev/ directory which you can use in any program.
  5. restart init.d with /etc/init.d ./udev restart