Backup and Restore
Version 3 (brfransen, 01/22/2019 08:13 pm)
1 | 1 | h1. Backup and Restore |
|
---|---|---|---|
2 | 1 | ||
3 | 3 | brfransen | h2. Automated Backup |
4 | 1 | ||
5 | 3 | brfransen | As of LinHES 7.2 there is an automated system backup that is done daily. The automated system backup is independent of the mythbackup and mythrestore scripts described in [[Backup_and_Restore#Manual Backup|Manual Backup]]. The system backup is saved to a single archive in the /myth/system_backups directory and contains only the mythtv database and /etc directory. Backups & Restores started from the [[Supplemental_web|Supplemental Web]] interface uses system backup. |
6 | 1 | ||
7 | 3 | brfransen | h2. Manual Backup |
8 | 1 | ||
9 | 3 | brfransen | "MythBackup and MythRestore Scripts":http://forums.linhes.org/viewtopic.php?p=112490#112490 |
10 | 3 | brfransen | |
11 | 2 | brfransen | h3. Menu |
12 | 1 | ||
13 | 2 | brfransen | In KnoppMyth R5 under "MythTV Configuration" select "Backup". |
14 | 2 | brfransen | |
15 | 1 | In LinHES under "Service Menu" select "Backup LinHES". |
|
16 | 2 | brfransen | |
17 | 2 | brfransen | h3. Command Line |
18 | 2 | brfransen | |
19 | 3 | brfransen | Follow these steps to make a backup in KnoppMyth R5 (R5C7 and newer) and LinHES from the command line. Doing this from the command line rather than through the menus will help you ensure that there aren't any undetected failures which will cause you grief later. Follow the directions at the bottom of "Backup and Restore Scripts":http://forum.linhes.org/viewtopic.php?p=112490#112490 for KnoppMyth R5B7 and older. |
20 | 2 | brfransen | |
21 | 2 | brfransen | * As root (or sudo), run the backup command. |
22 | 1 | <pre> |
|
23 | 2 | brfransen | sudo mythbackup |
24 | 1 | </pre> |
|
25 | 1 | ||
26 | 1 | * Make sure that the backup worked! The scripts automatically check and report their results but you have to pay attention. If you miss it, need to repeat the check for other reasons, or there is an error in the backup, run the following command as root and report the messages it produces: |
|
27 | 1 | <pre> |
|
28 | 1 | checkbackup |
|
29 | 1 | </pre> |
|
30 | 1 | ||
31 | 1 | * Check that you don't have multiple compression formats for a given backup filename which will cause confusion later using the following commands: |
|
32 | 1 | <pre> |
|
33 | 1 | ls -l /myth/backup/savedfiles.tar* /myth/backup/mythconverg.sql* | |
|
34 | 1 | sed '/\.[0-9]*$/d' |
|
35 | 1 | </pre> |
|
36 | 1 | It's OK if the savedfiles.tar and mythconverg.sql compression (or lack thereof) are different, however, the files should both show the same current date. On my system it produces these healthy results: |
|
37 | 1 | <pre> |
|
38 | 1 | root@black2:~# ls -l /myth/backup/savedfiles.tar* /myth/backup/mythconverg.sql* | sed '/\.[0-9]*$/d' |
|
39 | 1 | -rw------- 1 root root 23355203 Jun 4 23:45 /myth/backup/mythconverg.sql.gz |
|
40 | 1 | -rw------- 1 root root 24731079 Jun 4 23:45 /myth/backup/savedfiles.tar.gz |
|
41 | 1 | </pre> |