Wiki page
[Yet Another Backup Script] by
tangent
2022-03-29 19:36:58.
0000: 44 20 32 30 32 32 2d 30 33 2d 32 39 54 31 39 3a D 2022-03-29T19:
0010: 33 36 3a 35 38 2e 31 32 39 0a 4c 20 59 65 74 5c 36:58.129.L Yet\
0020: 73 41 6e 6f 74 68 65 72 5c 73 42 61 63 6b 75 70 sAnother\sBackup
0030: 5c 73 53 63 72 69 70 74 0a 4e 20 74 65 78 74 2f \sScript.N text/
0040: 78 2d 6d 61 72 6b 64 6f 77 6e 0a 50 20 36 39 34 x-markdown.P 694
0050: 37 62 33 35 30 66 65 39 37 32 34 66 65 63 64 63 7b350fe9724fecdc
0060: 33 64 39 64 31 34 38 64 32 38 64 38 35 39 64 37 3d9d148d28d859d7
0070: 37 34 63 63 63 65 65 37 64 35 63 30 38 66 62 64 74cccee7d5c08fbd
0080: 37 32 37 37 66 66 33 38 62 33 33 35 33 0a 55 20 7277ff38b3353.U
0090: 74 61 6e 67 65 6e 74 0a 57 20 31 33 35 37 31 0a tangent.W 13571.
00a0: 54 68 65 72 65 20 61 72 65 20 6d 61 6e 79 20 73 There are many s
00b0: 6f 6c 75 74 69 6f 6e 73 20 66 6f 72 20 62 61 63 olutions for bac
00c0: 6b 69 6e 67 20 75 70 20 52 6f 75 74 65 72 4f 53 king up RouterOS
00d0: 20 64 65 76 69 63 65 73 2e 20 54 68 69 73 20 6f devices. This o
00e0: 6e 65 20 69 73 20 6d 69 6e 65 2e 0d 0a 0d 0a 5b ne is mine.....[
00f0: 54 68 65 20 73 63 72 69 70 74 5d 5b 73 63 72 72 The script][scrr
0100: 61 77 5d 20 75 73 65 73 20 53 53 48 20 74 6f 20 aw] uses SSH to
0110: 63 72 65 61 74 65 20 61 6e 64 20 70 75 6c 6c 20 create and pull
0120: 74 68 65 20 62 61 63 6b 75 70 20 66 69 6c 65 73 the backup files
0130: 2c 20 77 68 69 63 68 20 69 74 20 74 68 65 6e 20 , which it then
0140: 73 74 6f 72 65 73 20 69 6e 20 5b 46 6f 73 73 69 stores in [Fossi
0150: 6c 5d 2c 20 74 68 65 20 76 65 72 73 69 6f 6e 20 l], the version
0160: 63 6f 6e 74 72 6f 6c 20 73 79 73 74 65 6d 20 62 control system b
0170: 61 63 6b 69 6e 67 20 74 68 69 73 20 76 65 72 79 acking this very
0180: 20 77 65 62 20 73 69 74 65 2e 20 54 68 61 74 20 web site. That
0190: 6d 65 61 6e 73 20 79 6f 75 20 63 61 6e 20 67 65 means you can ge
01a0: 74 20 61 20 77 65 62 20 76 69 65 77 20 6f 66 20 t a web view of
01b0: 79 6f 75 72 20 52 6f 75 74 65 72 4f 53 20 62 61 your RouterOS ba
01c0: 63 6b 75 70 73 20 75 73 69 6e 67 20 74 68 65 20 ckups using the
01d0: 5b 46 69 6c 65 73 5d 20 69 6e 74 65 72 66 61 63 [Files] interfac
01e0: 65 20 61 62 6f 76 65 2c 20 62 72 6f 77 73 65 20 e above, browse
01f0: 74 68 65 20 5b 68 69 73 74 6f 72 79 5d 20 6f 66 the [history] of
0200: 20 79 6f 75 72 20 62 61 63 6b 75 70 73 2c 20 67 your backups, g
0210: 65 74 20 67 72 61 70 68 69 63 61 6c 20 5b 64 69 et graphical [di
0220: 66 66 73 5d 20 62 65 74 77 65 65 6e 20 76 65 72 ffs] between ver
0230: 73 69 6f 6e 73 20 6f 66 20 79 6f 75 72 20 62 61 sions of your ba
0240: 63 6b 75 70 73 2c 20 5b 64 6f 77 6e 6c 6f 61 64 ckups, [download
0250: 5d 20 5a 69 70 20 61 72 63 68 69 76 65 73 20 6f ] Zip archives o
0260: 66 20 79 6f 75 72 20 6c 61 74 65 73 74 20 62 61 f your latest ba
0270: 63 6b 75 70 73 2c 20 61 6e 64 20 6d 6f 72 65 2e ckups, and more.
0280: 0d 0a 0d 0a 5b 64 69 66 66 73 5d 3a 20 20 20 20 ....[diffs]:
0290: 23 64 69 66 66 73 0d 0a 5b 64 6f 77 6e 6c 6f 61 #diffs..[downloa
02a0: 64 5d 3a 20 2f 68 65 6c 70 3f 63 6d 64 3d 2f 7a d]: /help?cmd=/z
02b0: 69 70 0d 0a 5b 46 69 6c 65 73 5d 3a 20 20 20 20 ip..[Files]:
02c0: 2f 64 69 72 0d 0a 5b 46 6f 73 73 69 6c 5d 3a 20 /dir..[Fossil]:
02d0: 20 20 68 74 74 70 73 3a 2f 2f 66 6f 73 73 69 6c https://fossil
02e0: 2d 73 63 6d 2e 6f 72 67 2f 0d 0a 5b 68 69 73 74 -scm.org/..[hist
02f0: 6f 72 79 5d 3a 20 20 2f 74 69 6d 65 6c 69 6e 65 ory]: /timeline
0300: 0d 0a 5b 73 63 72 72 61 77 5d 3a 20 20 20 2f 66 ..[scrraw]: /f
0310: 69 6c 65 2f 62 69 6e 2f 62 61 63 6b 75 70 2d 72 ile/bin/backup-r
0320: 6f 75 74 65 72 73 3f 63 69 3d 74 72 75 6e 6b 0d outers?ci=trunk.
0330: 0a 0d 0a 0d 0a 0d 0a 23 23 20 3c 61 20 69 64 3d .......## <a id=
0340: 22 72 65 71 22 3e 3c 2f 61 3e 52 65 71 75 69 72 "req"></a>Requir
0350: 65 6d 65 6e 74 73 0d 0a 0d 0a 23 23 23 20 31 2e ements....### 1.
0360: 20 50 4f 53 49 58 0d 0a 0d 0a 54 68 65 20 73 63 POSIX....The sc
0370: 72 69 70 74 20 77 61 73 20 77 72 69 74 74 65 6e ript was written
0380: 20 61 6e 64 20 74 65 73 74 65 64 20 75 6e 64 65 and tested unde
0390: 72 20 42 61 73 68 2c 20 74 68 6f 75 67 68 20 69 r Bash, though i
03a0: 74 20 73 68 6f 75 6c 64 20 62 65 20 70 6f 72 74 t should be port
03b0: 61 62 6c 65 20 74 6f 20 61 6e 79 20 6f 74 68 65 able to any othe
03c0: 72 20 50 4f 53 49 58 20 73 68 65 6c 6c 2c 20 6e r POSIX shell, n
03d0: 65 65 64 69 6e 67 20 6f 6e 6c 79 20 61 20 63 68 eeding only a ch
03e0: 61 6e 67 65 20 74 6f 20 74 68 65 20 5b 73 68 65 ange to the [she
03f0: 62 61 6e 67 5d 20 6c 69 6e 65 2e 20 49 74 20 72 bang] line. It r
0400: 65 6c 69 65 73 20 6f 6e 20 6f 74 68 65 72 20 50 elies on other P
0410: 4f 53 49 58 20 75 73 65 72 20 65 6e 76 69 72 6f OSIX user enviro
0420: 6e 6d 65 6e 74 20 73 74 75 66 66 3a 20 60 63 75 nment stuff: `cu
0430: 74 60 2c 20 60 67 72 65 70 60 2c 20 60 74 61 69 t`, `grep`, `tai
0440: 6c 60 2c 20 65 74 63 2e 20 49 74 20 77 61 73 20 l`, etc. It was
0450: 77 72 69 74 74 65 6e 20 66 6f 72 20 61 6e 64 20 written for and
0460: 74 65 73 74 65 64 20 6f 6e 20 61 20 6d 61 63 4f tested on a macO
0470: 53 20 73 79 73 74 65 6d 2c 20 62 75 74 20 69 74 S system, but it
0480: 20 73 68 6f 75 6c 64 20 72 75 6e 20 6a 75 73 74 should run just
0490: 20 61 73 20 77 65 6c 6c 20 6f 6e 20 4c 69 6e 75 as well on Linu
04a0: 78 2e 20 49 74 20 63 61 6e 20 62 65 20 6d 61 64 x. It can be mad
04b0: 65 20 74 6f 20 72 75 6e 20 6f 6e 20 6d 6f 64 65 e to run on mode
04c0: 72 6e 20 57 69 6e 64 6f 77 73 20 73 79 73 74 65 rn Windows syste
04d0: 6d 73 20 76 69 61 20 5b 57 53 4c 5d 2c 20 6f 72 ms via [WSL], or
04e0: 20 6f 6e 20 6c 65 67 61 63 79 20 57 69 6e 64 6f on legacy Windo
04f0: 77 73 20 73 79 73 74 65 6d 73 20 76 69 61 20 5b ws systems via [
0500: 43 79 67 77 69 6e 5d 28 68 74 74 70 3a 2f 2f 63 Cygwin](http://c
0510: 79 67 77 69 6e 2e 63 6f 6d 29 2e 0d 0a 0d 0a 5b ygwin.com).....[
0520: 73 68 65 62 61 6e 67 5d 3a 20 68 74 74 70 73 3a shebang]: https:
0530: 2f 2f 65 6e 2e 77 69 6b 69 70 65 64 69 61 2e 6f //en.wikipedia.o
0540: 72 67 2f 77 69 6b 69 2f 53 68 65 62 61 6e 67 5f rg/wiki/Shebang_
0550: 28 55 6e 69 78 29 0d 0a 5b 57 53 4c 5d 3a 20 20 (Unix)..[WSL]:
0560: 20 20 20 68 74 74 70 73 3a 2f 2f 64 6f 63 73 2e https://docs.
0570: 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 77 69 microsoft.com/wi
0580: 6e 64 6f 77 73 2f 77 73 6c 0d 0a 0d 0a 0d 0a 23 ndows/wsl......#
0590: 23 23 20 32 2e 20 43 6f 6d 6d 61 6e 64 2d 4c 69 ## 2. Command-Li
05a0: 6e 65 20 53 53 48 0d 0a 0d 0a 54 68 65 20 73 63 ne SSH....The sc
05b0: 72 69 70 74 20 77 61 73 20 77 72 69 74 74 65 6e ript was written
05c0: 20 66 6f 72 20 73 79 73 74 65 6d 73 20 77 69 74 for systems wit
05d0: 68 20 74 68 65 20 5b 4f 70 65 6e 53 53 48 5d 20 h the [OpenSSH]
05e0: 63 6f 6d 6d 61 6e 64 73 20 69 6e 20 6d 69 6e 64 commands in mind
05f0: 2e 20 4f 70 65 6e 53 53 48 20 69 73 20 69 6e 73 . OpenSSH is ins
0600: 74 61 6c 6c 65 64 20 62 79 20 64 65 66 61 75 6c talled by defaul
0610: 74 20 6f 6e 20 76 69 72 74 75 61 6c 6c 79 20 65 t on virtually e
0620: 76 65 72 79 20 4c 69 6e 75 78 20 61 6e 64 20 6d very Linux and m
0630: 61 63 4f 53 20 73 79 73 74 65 6d 2c 20 61 6e 64 acOS system, and
0640: 20 5b 69 74 27 73 20 61 20 66 69 72 73 74 2d 70 [it's a first-p
0650: 61 72 74 79 20 61 64 64 2d 6f 6e 20 66 72 6f 6d arty add-on from
0660: 20 4d 69 63 72 6f 73 6f 66 74 5d 5b 73 73 68 77 Microsoft][sshw
0670: 69 6e 5d 20 66 6f 72 20 6d 6f 64 65 72 6e 20 57 in] for modern W
0680: 69 6e 64 6f 77 73 20 76 65 72 73 69 6f 6e 73 2e indows versions.
0690: 20 54 68 65 72 65 20 6d 61 79 20 62 65 20 74 68 There may be th
06a0: 69 72 64 2d 70 61 72 74 79 20 53 53 48 20 63 6f ird-party SSH co
06b0: 6d 6d 61 6e 64 20 6c 69 6e 65 20 69 6d 70 6c 65 mmand line imple
06c0: 6d 65 6e 74 61 74 69 6f 6e 73 20 74 68 61 74 20 mentations that
06d0: 75 73 65 20 74 68 65 20 73 61 6d 65 20 63 6f 6d use the same com
06e0: 6d 61 6e 64 20 66 6f 72 6d 61 74 73 20 74 68 69 mand formats thi
06f0: 73 20 73 63 72 69 70 74 20 72 65 6c 69 65 73 20 s script relies
0700: 6f 6e 2c 20 62 75 74 20 6e 6f 20 61 74 74 65 6d on, but no attem
0710: 70 74 20 68 61 73 20 62 65 65 6e 20 6d 61 64 65 pt has been made
0720: 20 74 6f 20 76 65 72 69 66 79 20 74 68 69 73 2e to verify this.
0730: 0d 0a 0d 0a 5b 4f 70 65 6e 53 53 48 5d 3a 20 68 ....[OpenSSH]: h
0740: 74 74 70 73 3a 2f 2f 77 77 77 2e 6f 70 65 6e 73 ttps://www.opens
0750: 73 68 2e 63 6f 6d 2f 0d 0a 5b 73 73 68 77 69 6e sh.com/..[sshwin
0760: 5d 3a 20 20 68 74 74 70 73 3a 2f 2f 64 6f 63 73 ]: https://docs
0770: 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 77 .microsoft.com/w
0780: 69 6e 64 6f 77 73 2d 73 65 72 76 65 72 2f 61 64 indows-server/ad
0790: 6d 69 6e 69 73 74 72 61 74 69 6f 6e 2f 6f 70 65 ministration/ope
07a0: 6e 73 73 68 2f 6f 70 65 6e 73 73 68 5f 6f 76 65 nssh/openssh_ove
07b0: 72 76 69 65 77 0d 0a 0d 0a 0d 0a 23 23 23 20 33 rview......### 3
07c0: 2e 20 46 6f 73 73 69 6c 0d 0a 0d 0a 54 68 65 20 . Fossil....The
07d0: 5b 46 6f 73 73 69 6c 5d 20 76 65 72 73 69 6f 6e [Fossil] version
07e0: 20 63 6f 6e 74 72 6f 6c 20 73 79 73 74 65 6d 20 control system
07f0: 69 73 20 64 65 73 69 67 6e 65 64 20 77 69 74 68 is designed with
0800: 20 74 68 65 20 73 61 6d 65 20 73 65 6e 73 69 62 the same sensib
0810: 69 6c 69 74 79 20 61 73 20 52 6f 75 74 65 72 4f ility as RouterO
0820: 53 3a 20 73 65 6c 66 2d 63 6f 6e 74 61 69 6e 65 S: self-containe
0830: 64 2c 20 66 65 61 74 75 72 65 66 75 6c 2c 20 63 d, featureful, c
0840: 6f 6d 70 61 63 74 2c 20 61 6e 64 20 63 6f 68 65 ompact, and cohe
0850: 72 65 6e 74 2e 20 46 61 6e 73 20 6f 66 20 6f 74 rent. Fans of ot
0860: 68 65 72 20 5b 56 43 53 65 73 5d 20 61 72 65 20 her [VCSes] are
0870: 65 6e 63 6f 75 72 61 67 65 64 20 74 6f 20 67 69 encouraged to gi
0880: 76 65 20 74 68 65 20 73 63 72 69 70 74 20 61 20 ve the script a
0890: 74 72 79 20 61 73 2d 69 73 20 62 65 66 6f 72 65 try as-is before
08a0: 20 67 6f 69 6e 67 20 69 6e 20 61 6e 64 20 5b 68 going in and [h
08b0: 61 63 6b 69 6e 67 20 69 74 20 74 6f 20 75 73 65 acking it to use
08c0: 20 79 6f 75 72 20 63 75 72 72 65 6e 74 20 56 43 your current VC
08d0: 53 20 6f 66 20 63 68 6f 69 63 65 5d 28 23 61 6c S of choice](#al
08e0: 74 76 63 73 29 2e 20 59 6f 75 20 6d 69 67 68 74 tvcs). You might
08f0: 20 66 69 6e 64 20 74 68 61 74 20 79 6f 75 20 65 find that you e
0900: 6e 6a 6f 79 20 46 6f 73 73 69 6c 20 66 6f 72 20 njoy Fossil for
0910: 74 68 65 20 73 61 6d 65 20 72 65 61 73 6f 6e 73 the same reasons
0920: 20 79 6f 75 20 65 6e 6a 6f 79 20 52 6f 75 74 65 you enjoy Route
0930: 72 4f 53 2e 0d 0a 0d 0a 0d 0a 23 23 23 20 34 2e rOS.......### 4.
0940: 20 54 68 65 20 53 63 72 69 70 74 0d 0a 0d 0a 59 The Script....Y
0950: 6f 75 20 63 61 6e 20 64 6f 77 6e 6c 6f 61 64 20 ou can download
0960: 74 68 65 20 6c 61 74 65 73 74 20 76 65 72 73 69 the latest versi
0970: 6f 6e 20 6f 66 20 74 68 65 20 73 63 72 69 70 74 on of the script
0980: 20 5b 68 65 72 65 5d 28 2f 7a 69 70 2f 74 72 75 [here](/zip/tru
0990: 6e 6b 2f 62 61 63 6b 75 70 2d 72 6f 75 74 65 72 nk/backup-router
09a0: 73 2e 7a 69 70 29 2e 0d 0a 0d 0a 41 6c 74 65 72 s.zip).....Alter
09b0: 6e 61 74 65 6c 79 2c 20 79 6f 75 20 6d 61 79 20 nately, you may
09c0: 77 69 73 68 20 74 6f 20 5b 6d 61 69 6e 74 61 69 wish to [maintai
09d0: 6e 20 61 20 6c 6f 63 61 6c 20 66 6f 72 6b 20 6f n a local fork o
09e0: 66 20 74 68 69 73 20 72 65 70 6f 73 69 74 6f 72 f this repositor
09f0: 79 5d 5b 6c 66 6f 72 6b 5d 20 73 6f 20 79 6f 75 y][lfork] so you
0a00: 20 63 61 6e 20 6d 61 6e 61 67 65 20 79 6f 75 72 can manage your
0a10: 20 6c 6f 63 61 6c 20 6d 6f 64 69 66 69 63 61 74 local modificat
0a20: 69 6f 6e 73 20 77 69 74 68 6f 75 74 20 6e 65 65 ions without nee
0a30: 64 69 6e 67 20 74 6f 20 6f 76 65 72 77 72 69 74 ding to overwrit
0a40: 65 20 74 68 65 6d 20 65 61 63 68 20 74 69 6d 65 e them each time
0a50: 20 74 68 69 73 20 73 63 72 69 70 74 20 63 68 61 this script cha
0a60: 6e 67 65 73 2e 0d 0a 0d 0a 5b 6c 66 6f 72 6b 5d nges.....[lfork]
0a70: 3a 20 2f 77 69 6b 69 3f 6e 61 6d 65 3d 4d 61 69 : /wiki?name=Mai
0a80: 6e 74 61 69 6e 69 6e 67 25 32 30 61 25 32 30 4c ntaining%20a%20L
0a90: 6f 63 61 6c 25 32 30 46 6f 72 6b 0d 0a 0d 0a 0d ocal%20Fork.....
0aa0: 0a 0d 0a 0d 0a 23 23 20 3c 61 20 69 64 3d 22 70 .....## <a id="p
0ab0: 72 65 70 22 3e 3c 2f 61 3e 50 72 65 70 61 72 61 rep"></a>Prepara
0ac0: 74 69 6f 6e 0d 0a 0d 0a 31 2e 20 5b 53 65 74 20 tion....1. [Set
0ad0: 75 70 20 53 53 48 5d 5b 73 73 68 73 65 72 76 5d up SSH][sshserv]
0ae0: 20 6f 6e 20 65 61 63 68 20 52 6f 75 74 65 72 4f on each RouterO
0af0: 53 20 62 6f 78 20 79 6f 75 20 77 61 6e 74 20 62 S box you want b
0b00: 61 63 6b 65 64 20 75 70 2c 20 5b 77 69 74 68 20 acked up, [with
0b10: 68 6f 73 74 20 6b 65 79 73 5d 5b 68 6b 65 79 5d host keys][hkey]
0b20: 20 66 6f 72 20 61 75 74 6f 6d 61 74 65 64 20 6c for automated l
0b30: 6f 67 69 6e 2e 0d 0a 0d 0a 31 2e 20 41 64 6a 75 ogin.....1. Adju
0b40: 73 74 20 74 68 65 20 75 73 65 72 2d 63 6f 6e 66 st the user-conf
0b50: 69 67 75 72 61 62 6c 65 20 76 61 72 69 61 62 6c igurable variabl
0b60: 65 73 20 61 74 20 74 68 65 20 74 6f 70 20 6f 66 es at the top of
0b70: 20 74 68 65 20 73 63 72 69 70 74 3a 0d 0a 0d 0a the script:....
0b80: 20 20 20 20 2a 2a 72 64 69 72 2a 2a 20 69 73 20 **rdir** is
0b90: 74 68 65 20 46 6f 73 73 69 6c 20 72 65 70 6f 73 the Fossil repos
0ba0: 69 74 6f 72 79 20 64 69 72 65 63 74 6f 72 79 2e itory directory.
0bb0: 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 The default is
0bc0: 22 60 7e 2f 6d 75 73 65 75 6d 60 22 2c 20 62 65 "`~/museum`", be
0bd0: 69 6e 67 20 61 20 70 6c 61 63 65 20 77 68 65 72 ing a place wher
0be0: 65 20 6f 6e 65 20 73 74 6f 72 65 73 20 70 72 65 e one stores pre
0bf0: 63 69 6f 75 73 20 46 6f 73 73 69 6c 73 2c 20 62 cious Fossils, b
0c00: 75 74 20 79 6f 75 20 61 72 65 20 66 72 65 65 20 ut you are free
0c10: 74 6f 20 75 73 65 20 61 6e 79 74 68 69 6e 67 20 to use anything
0c20: 65 6c 73 65 20 79 6f 75 20 6c 69 6b 65 2e 0d 0a else you like...
0c30: 0d 0a 20 20 20 20 2a 2a 72 65 70 6f 2a 2a 20 69 .. **repo** i
0c40: 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 s the name of th
0c50: 65 20 61 63 74 75 61 6c 20 46 6f 73 73 69 6c 20 e actual Fossil
0c60: 72 65 70 6f 73 69 74 6f 72 79 20 75 6e 64 65 72 repository under
0c70: 20 60 24 72 64 69 72 60 20 77 68 65 72 65 20 79 `$rdir` where y
0c80: 6f 75 20 77 61 6e 74 20 79 6f 75 72 20 62 61 63 ou want your bac
0c90: 6b 75 70 73 20 73 74 6f 72 65 64 2e 20 54 68 65 kups stored. The
0ca0: 79 27 72 65 20 73 65 70 61 72 61 74 65 20 62 65 y're separate be
0cb0: 63 61 75 73 65 20 79 6f 75 20 6d 61 79 20 68 61 cause you may ha
0cc0: 76 65 20 6f 74 68 65 72 20 46 6f 73 73 69 6c 20 ve other Fossil
0cd0: 72 65 70 6f 73 20 75 6e 64 65 72 20 74 68 61 74 repos under that
0ce0: 20 64 69 72 65 63 74 6f 72 79 3b 20 74 68 69 73 directory; this
0cf0: 20 73 63 72 69 70 74 20 64 65 61 6c 73 20 77 69 script deals wi
0d00: 74 68 20 6a 75 73 74 20 74 68 61 74 20 6f 6e 65 th just that one
0d10: 20 72 65 70 6f 2e 0d 0a 0d 0a 20 20 20 20 2a 2a repo..... **
0d20: 62 64 69 72 2a 2a 20 69 73 20 77 68 65 72 65 20 bdir** is where
0d30: 79 6f 75 72 20 5b 6c 6f 63 61 6c 20 63 68 65 63 your [local chec
0d40: 6b 2d 6f 75 74 5d 5b 6c 63 6f 5d 20 6f 66 20 74 k-out][lco] of t
0d50: 68 65 20 62 61 63 6b 75 70 20 72 65 70 6f 73 69 he backup reposi
0d60: 74 6f 72 79 20 6c 69 76 65 73 2e 20 54 68 69 73 tory lives. This
0d70: 20 63 61 6e 20 62 65 20 61 6e 79 77 68 65 72 65 can be anywhere
0d80: 20 65 6c 73 65 20 6f 6e 20 74 68 65 20 73 79 73 else on the sys
0d90: 74 65 6d 2e 20 57 68 65 72 65 76 65 72 20 79 6f tem. Wherever yo
0da0: 75 20 77 61 6e 74 20 74 68 65 20 63 75 72 72 65 u want the curre
0db0: 6e 74 20 76 65 72 73 69 6f 6e 73 20 6f 66 20 79 nt versions of y
0dc0: 6f 75 72 20 62 61 63 6b 75 70 73 20 6f 6e 20 79 our backups on y
0dd0: 6f 75 72 20 6c 6f 63 61 6c 20 6d 61 63 68 69 6e our local machin
0de0: 65 2c 20 74 68 61 74 27 73 20 77 68 65 72 65 20 e, that's where
0df0: 79 6f 75 20 73 68 6f 75 6c 64 20 70 6f 69 6e 74 you should point
0e00: 20 74 68 69 73 20 73 63 72 69 70 74 2e 0d 0a 0d this script....
0e10: 0a 31 2e 20 52 75 6e 20 74 68 65 20 73 63 72 69 .1. Run the scri
0e20: 70 74 20 62 79 20 68 61 6e 64 2c 20 70 61 73 73 pt by hand, pass
0e30: 69 6e 67 20 74 68 65 20 68 6f 73 74 6e 61 6d 65 ing the hostname
0e40: 73 20 6f 72 20 49 50 73 20 6f 66 20 74 68 65 20 s or IPs of the
0e50: 52 6f 75 74 65 72 4f 53 20 62 6f 78 65 73 20 79 RouterOS boxes y
0e60: 6f 75 20 77 61 6e 74 20 69 74 20 74 6f 20 62 61 ou want it to ba
0e70: 63 6b 20 75 70 2e 20 49 74 20 77 69 6c 6c 20 64 ck up. It will d
0e80: 6f 20 74 68 65 20 69 6e 69 74 69 61 6c 20 62 61 o the initial ba
0e90: 63 6b 75 70 20 6f 6e 20 74 68 6f 73 65 20 62 6f ckup on those bo
0ea0: 78 65 73 2e 0d 0a 0d 0a 5b 68 6b 65 79 5d 3a 20 xes.....[hkey]:
0eb0: 20 20 20 20 68 74 74 70 73 3a 2f 2f 68 65 6c 70 https://help
0ec0: 2e 6d 69 6b 72 6f 74 69 6b 2e 63 6f 6d 2f 64 6f .mikrotik.com/do
0ed0: 63 73 2f 64 69 73 70 6c 61 79 2f 52 4f 53 2f 55 cs/display/ROS/U
0ee0: 73 65 72 23 55 73 65 72 2d 53 53 48 4b 65 79 73 ser#User-SSHKeys
0ef0: 0d 0a 5b 6c 63 6f 5d 3a 20 20 20 20 20 20 68 74 ..[lco]: ht
0f00: 74 70 73 3a 2f 2f 66 6f 73 73 69 6c 2d 73 63 6d tps://fossil-scm
0f10: 2e 6f 72 67 2f 68 6f 6d 65 2f 64 6f 63 2f 74 72 .org/home/doc/tr
0f20: 75 6e 6b 2f 77 77 77 2f 67 6c 6f 73 73 61 72 79 unk/www/glossary
0f30: 2e 6d 64 23 63 68 65 63 6b 2d 6f 75 74 0d 0a 5b .md#check-out..[
0f40: 73 73 68 73 65 72 76 5d 3a 20 20 68 74 74 70 73 sshserv]: https
0f50: 3a 2f 2f 68 65 6c 70 2e 6d 69 6b 72 6f 74 69 6b ://help.mikrotik
0f60: 2e 63 6f 6d 2f 64 6f 63 73 2f 64 69 73 70 6c 61 .com/docs/displa
0f70: 79 2f 52 4f 53 2f 53 65 72 76 69 63 65 73 0d 0a y/ROS/Services..
0f80: 0d 0a 0d 0a 0d 0a 0d 0a 23 23 20 3c 61 20 69 64 ........## <a id
0f90: 3d 22 75 73 61 67 65 22 3e 3c 2f 61 3e 55 73 61 ="usage"></a>Usa
0fa0: 67 65 0d 0a 0d 0a 4f 6e 63 65 20 74 68 65 20 62 ge....Once the b
0fb0: 61 63 6b 75 70 20 65 6e 76 69 72 6f 6e 6d 65 6e ackup environmen
0fc0: 74 20 69 73 20 73 65 74 20 75 70 2c 20 79 6f 75 t is set up, you
0fd0: 20 63 61 6e 20 73 69 6d 70 6c 79 20 72 75 6e 20 can simply run
0fe0: 74 68 69 73 20 73 63 72 69 70 74 20 77 69 74 68 this script with
0ff0: 6f 75 74 20 61 72 67 75 6d 65 6e 74 73 20 65 61 out arguments ea
1000: 63 68 20 74 69 6d 65 20 79 6f 75 20 77 61 6e 74 ch time you want
1010: 20 61 6e 6f 74 68 65 72 20 62 61 63 6b 75 70 20 another backup
1020: 74 61 6b 65 6e 2e 20 49 74 20 69 74 65 72 61 74 taken. It iterat
1030: 65 73 20 6f 76 65 72 20 74 68 65 20 70 65 72 2d es over the per-
1040: 68 6f 73 74 20 73 75 62 64 69 72 65 63 74 6f 72 host subdirector
1050: 79 20 6e 61 6d 65 73 20 69 74 20 66 69 6e 64 73 y names it finds
1060: 20 69 6e 20 60 24 62 64 69 72 60 20 61 6e 64 20 in `$bdir` and
1070: 75 70 64 61 74 65 73 20 74 68 65 20 72 65 70 6f updates the repo
1080: 73 69 74 6f 72 79 20 77 69 74 68 20 66 72 65 73 sitory with fres
1090: 68 20 62 61 63 6b 75 70 73 2e 0d 0a 0d 0a 54 68 h backups.....Th
10a0: 65 20 73 63 72 69 70 74 20 70 72 6f 6d 70 74 73 e script prompts
10b0: 20 74 68 65 20 75 73 65 72 20 66 6f 72 20 61 20 the user for a
10c0: 63 6f 6d 6d 69 74 20 6d 65 73 73 61 67 65 20 66 commit message f
10d0: 6f 72 20 65 61 63 68 20 62 61 63 6b 75 70 20 61 or each backup a
10e0: 66 74 65 72 20 74 68 65 20 69 6e 69 74 69 61 6c fter the initial
10f0: 20 6f 6e 65 2e 20 54 68 65 20 69 64 65 61 20 69 one. The idea i
1100: 73 20 74 68 61 74 20 74 68 65 72 65 20 69 73 20 s that there is
1110: 73 6f 6d 65 20 64 6f 63 75 6d 65 6e 74 61 62 6c some documentabl
1120: 65 20 72 65 61 73 6f 6e 20 62 65 68 69 6e 64 20 e reason behind
1130: 65 61 63 68 20 62 61 63 6b 75 70 2e 20 45 78 61 each backup. Exa
1140: 6d 70 6c 65 73 3a 0d 0a 0d 0a 2a 20 75 70 67 72 mples:....* upgr
1150: 61 64 65 64 20 74 6f 20 52 6f 75 74 65 72 4f 53 aded to RouterOS
1160: 20 37 2e 31 2e 34 0d 0a 2a 20 66 69 78 65 64 20 7.1.4..* fixed
1170: 61 6e 20 4f 53 50 46 20 63 6f 6e 66 69 67 75 72 an OSPF configur
1180: 61 74 69 6f 6e 20 62 75 67 0d 0a 2a 20 65 6e 61 ation bug..* ena
1190: 62 6c 65 64 20 57 69 72 65 47 75 61 72 64 20 6f bled WireGuard o
11a0: 6e 20 74 68 65 20 62 6f 72 64 65 72 20 67 61 74 n the border gat
11b0: 65 77 61 79 0d 0a 2a 20 75 70 64 61 74 65 64 20 eway..* updated
11c0: 74 68 65 20 66 69 72 65 77 61 6c 6c 20 72 75 6c the firewall rul
11d0: 65 73 20 74 6f 20 62 6c 6f 63 6b 20 60 24 56 55 es to block `$VU
11e0: 4c 4e 5f 44 55 5f 4a 4f 55 52 60 0d 0a 0d 0a 54 LN_DU_JOUR`....T
11f0: 68 69 73 20 73 74 65 70 20 64 6f 65 73 20 6d 65 his step does me
1200: 61 6e 20 74 68 65 20 73 63 72 69 70 74 20 69 73 an the script is
1210: 6e 27 74 20 73 75 69 74 65 64 20 74 6f 20 61 75 n't suited to au
1220: 74 6f 6d 61 74 65 64 20 62 61 63 6b 75 70 73 2e tomated backups.
1230: 20 49 66 20 74 68 61 74 20 62 6f 74 68 65 72 73 If that bothers
1240: 20 79 6f 75 2c 20 63 68 61 6e 67 65 20 74 68 65 you, change the
1250: 20 22 60 66 6f 73 73 69 6c 20 63 69 60 22 20 6c "`fossil ci`" l
1260: 69 6e 65 20 6e 65 61 72 20 74 68 65 20 65 6e 64 ine near the end
1270: 2c 20 70 61 73 73 69 6e 67 20 61 20 63 61 6e 6e , passing a cann
1280: 65 64 20 6f 72 20 63 6f 6d 70 75 74 65 64 20 6d ed or computed m
1290: 65 73 73 61 67 65 20 76 69 61 20 74 68 65 20 60 essage via the `
12a0: 2d 6d 60 20 66 6c 61 67 2e 0d 0a 0d 0a 59 6f 75 -m` flag.....You
12b0: 20 63 61 6e 20 70 61 73 73 20 6f 6e 65 20 6f 72 can pass one or
12c0: 20 6d 6f 72 65 20 68 6f 73 74 6e 61 6d 65 73 20 more hostnames
12d0: 6f 72 20 49 50 73 20 61 66 74 65 72 20 74 68 65 or IPs after the
12e0: 20 69 6e 69 74 69 61 6c 20 73 65 74 75 70 2c 20 initial setup,
12f0: 69 6e 20 77 68 69 63 68 20 63 61 73 65 20 77 68 in which case wh
1300: 61 74 20 79 6f 75 20 67 65 74 20 69 73 20 61 20 at you get is a
1310: 6c 69 6d 69 74 65 64 20 62 61 63 6b 75 70 20 6f limited backup o
1320: 66 20 6f 6e 6c 79 20 74 68 65 20 6e 61 6d 65 64 f only the named
1330: 20 68 6f 73 74 73 2e 20 49 20 75 73 65 20 74 68 hosts. I use th
1340: 69 73 20 66 65 61 74 75 72 65 20 77 68 65 6e 20 is feature when
1350: 63 61 72 65 66 75 6c 6c 79 20 72 6f 6c 6c 69 6e carefully rollin
1360: 67 20 6f 75 74 20 61 20 6e 65 77 20 52 6f 75 74 g out a new Rout
1370: 65 72 4f 53 20 76 65 72 73 69 6f 6e 2c 20 73 69 erOS version, si
1380: 6e 63 65 20 5b 69 74 20 67 69 76 65 73 20 6d 65 nce [it gives me
1390: 20 61 20 64 69 66 66 5d 28 23 64 69 66 66 73 29 a diff](#diffs)
13a0: 20 62 65 74 77 65 65 6e 20 74 68 65 20 6f 6c 64 between the old
13b0: 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 61 configuration a
13c0: 6e 64 20 74 68 65 20 75 70 67 72 61 64 65 64 20 nd the upgraded
13d0: 6f 6e 65 2e 20 49 20 64 6f 6e 27 74 20 6e 65 65 one. I don't nee
13e0: 64 20 63 6f 6d 70 6c 65 74 65 20 62 61 63 6b 75 d complete backu
13f0: 70 73 20 74 61 6b 65 6e 20 6f 66 20 61 6c 6c 20 ps taken of all
1400: 74 68 65 20 6f 74 68 65 72 20 52 6f 75 74 65 72 the other Router
1410: 4f 53 20 62 6f 78 65 73 3b 20 74 68 65 79 27 72 OS boxes; they'r
1420: 65 20 73 74 69 6c 6c 20 63 75 72 72 65 6e 74 2c e still current,
1430: 20 73 6f 20 77 68 79 20 62 75 72 6e 20 74 68 65 so why burn the
1440: 20 6e 65 74 77 6f 72 6b 20 74 69 6d 65 20 6f 72 network time or
1450: 20 63 6c 75 74 74 65 72 20 75 70 20 74 68 65 69 clutter up thei
1460: 72 20 6c 6f 63 61 6c 20 66 69 6c 65 20 73 74 6f r local file sto
1470: 72 61 67 65 3f 0d 0a 0d 0a 0d 0a 23 23 20 3c 61 rage?......## <a
1480: 20 69 64 3d 22 63 6f 6d 70 72 65 73 73 69 6f 6e id="compression
1490: 22 3e 3c 2f 61 3e 43 6f 6d 70 72 65 73 73 69 6f "></a>Compressio
14a0: 6e 0d 0a 0d 0a 54 68 65 20 73 63 72 69 70 74 20 n....The script
14b0: 64 65 74 65 63 74 73 20 77 68 65 6e 20 72 6f 75 detects when rou
14c0: 74 65 72 20 63 6f 6e 66 69 67 75 72 61 74 69 6f ter configuratio
14d0: 6e 73 20 68 61 76 65 6e 27 74 20 63 68 61 6e 67 ns haven't chang
14e0: 65 64 20 73 69 6e 63 65 20 74 68 65 20 6c 61 73 ed since the las
14f0: 74 20 62 61 63 6b 75 70 2c 20 74 6f 20 70 72 65 t backup, to pre
1500: 76 65 6e 74 20 69 74 20 66 72 6f 6d 20 62 61 6c vent it from bal
1510: 6c 6f 6f 6e 69 6e 67 20 79 6f 75 72 20 62 61 63 looning your bac
1520: 6b 75 70 20 72 65 70 6f 20 77 69 74 68 20 72 65 kup repo with re
1530: 64 75 6e 64 61 6e 74 20 63 6f 70 69 65 73 2e 20 dundant copies.
1540: 54 68 69 73 20 61 6c 73 6f 20 65 61 73 65 73 20 This also eases
1550: 64 69 66 66 73 20 62 65 74 77 65 65 6e 20 76 65 diffs between ve
1560: 72 73 69 6f 6e 73 3a 20 61 6e 79 20 63 68 61 6e rsions: any chan
1570: 67 65 20 74 6f 20 74 68 65 20 74 65 78 74 75 61 ge to the textua
1580: 6c 20 60 2f 65 78 70 6f 72 74 60 20 66 69 6c 65 l `/export` file
1590: 20 28 60 2a 2e 72 73 63 60 29 20 62 65 74 77 65 (`*.rsc`) betwe
15a0: 65 6e 20 76 65 72 73 69 6f 6e 73 20 77 69 6c 6c en versions will
15b0: 20 62 65 20 61 73 20 73 75 62 73 74 61 6e 74 69 be as substanti
15c0: 61 6c 20 61 73 20 74 68 65 20 63 68 61 6e 67 65 al as the change
15d0: 20 6d 61 64 65 2e 0d 0a 0d 0a 41 74 6f 70 20 74 made.....Atop t
15e0: 68 69 73 2c 20 46 6f 73 73 69 6c 20 68 61 73 20 his, Fossil has
15f0: 61 20 74 77 6f 2d 6c 65 76 65 6c 20 63 6f 6d 70 a two-level comp
1600: 72 65 73 73 69 6f 6e 20 73 63 68 65 6d 65 20 74 ression scheme t
1610: 68 61 74 20 6b 65 65 70 73 20 74 68 65 20 72 65 hat keeps the re
1620: 70 6f 73 69 74 6f 72 79 20 73 69 7a 65 20 73 6d pository size sm
1630: 61 6c 6c 2e 20 46 6f 72 20 75 6e 63 6f 6d 70 72 all. For uncompr
1640: 65 73 73 65 64 20 64 61 74 61 20 6c 69 6b 65 20 essed data like
1650: 74 68 65 73 65 20 62 61 63 6b 75 70 73 2c 20 69 these backups, i
1660: 74 20 63 6f 6d 70 75 74 65 73 20 61 20 5b 62 69 t computes a [bi
1670: 6e 61 72 79 20 64 65 6c 74 61 5d 5b 64 63 6f 6d nary delta][dcom
1680: 70 5d 20 62 65 74 77 65 65 6e 20 76 65 72 73 69 p] between versi
1690: 6f 6e 73 20 61 6e 64 20 73 74 6f 72 65 73 20 6f ons and stores o
16a0: 6e 6c 79 20 74 68 65 20 63 68 61 6e 67 65 73 2e nly the changes.
16b0: 20 49 74 20 74 68 65 6e 20 61 70 70 6c 69 65 73 It then applies
16c0: 20 5b 64 61 74 61 20 63 6f 6d 70 72 65 73 73 69 [data compressi
16d0: 6f 6e 5d 5b 64 65 66 6c 61 74 65 5d 20 74 6f 20 on][deflate] to
16e0: 74 68 65 20 64 69 66 66 2e 20 59 6f 75 20 63 61 the diff. You ca
16f0: 6e 20 65 78 70 65 63 74 20 79 6f 75 72 20 69 6e n expect your in
1700: 69 74 69 61 6c 20 72 65 70 6f 73 69 74 6f 72 79 itial repository
1710: 20 73 69 7a 65 20 74 6f 20 62 65 20 61 62 6f 75 size to be abou
1720: 74 20 68 61 6c 66 20 74 68 65 20 73 69 7a 65 20 t half the size
1730: 6f 66 20 74 68 65 20 63 68 65 63 6b 2d 6f 75 74 of the check-out
1740: 20 64 69 72 65 63 74 6f 72 79 20 63 6f 6e 74 65 directory conte
1750: 6e 74 73 2c 20 74 68 65 6e 20 74 6f 20 67 72 6f nts, then to gro
1760: 77 20 73 6c 6f 77 6c 79 20 66 72 6f 6d 20 74 68 w slowly from th
1770: 65 72 65 2c 20 6e 6f 74 20 73 75 72 70 61 73 73 ere, not surpass
1780: 69 6e 67 20 74 68 65 20 63 68 65 63 6b 2d 6f 75 ing the check-ou
1790: 74 20 64 69 72 65 63 74 6f 72 79 20 73 69 7a 65 t directory size
17a0: 20 75 6e 74 69 6c 20 73 65 76 65 72 61 6c 20 62 until several b
17b0: 61 63 6b 75 70 73 20 68 61 76 65 20 62 65 65 6e ackups have been
17c0: 20 74 61 6b 65 6e 2e 0d 0a 0d 0a 5b 64 63 6f 6d taken.....[dcom
17d0: 70 5d 3a 20 20 20 68 74 74 70 73 3a 2f 2f 66 6f p]: https://fo
17e0: 73 73 69 6c 2d 73 63 6d 2e 6f 72 67 2f 68 6f 6d ssil-scm.org/hom
17f0: 65 2f 64 6f 63 2f 74 72 75 6e 6b 2f 77 77 77 2f e/doc/trunk/www/
1800: 64 65 6c 74 61 5f 66 6f 72 6d 61 74 2e 77 69 6b delta_format.wik
1810: 69 0d 0a 5b 64 65 66 6c 61 74 65 5d 3a 20 68 74 i..[deflate]: ht
1820: 74 70 73 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 64 tps://en.wikiped
1830: 69 61 2e 6f 72 67 2f 77 69 6b 69 2f 44 65 66 6c ia.org/wiki/Defl
1840: 61 74 65 0d 0a 0d 0a 0d 0a 0d 0a 23 23 20 3c 61 ate........## <a
1850: 20 69 64 3d 22 64 69 66 66 73 22 3e 3c 2f 61 3e id="diffs"></a>
1860: 44 69 66 66 73 0d 0a 0d 0a 54 68 65 20 73 63 72 Diffs....The scr
1870: 69 70 74 20 70 72 6f 64 75 63 65 73 20 61 20 67 ipt produces a g
1880: 72 61 70 68 69 63 61 6c 20 5b 64 69 66 66 5d 20 raphical [diff]
1890: 61 73 20 69 74 73 20 6c 61 73 74 20 73 74 65 70 as its last step
18a0: 20 62 65 66 6f 72 65 20 63 6f 6d 6d 69 74 74 69 before committi
18b0: 6e 67 20 61 20 62 61 63 6b 75 70 20 74 6f 20 74 ng a backup to t
18c0: 68 65 20 72 65 70 6f 73 69 74 6f 72 79 2c 20 61 he repository, a
18d0: 6c 6c 6f 77 69 6e 67 20 79 6f 75 20 74 6f 20 61 llowing you to a
18e0: 62 6f 72 74 20 61 20 63 6f 6d 6d 69 74 20 69 66 bort a commit if
18f0: 20 79 6f 75 20 73 65 65 20 63 68 61 6e 67 65 73 you see changes
1900: 20 79 6f 75 20 64 6f 6e 27 74 20 6c 69 6b 65 2e you don't like.
1910: 20 43 6f 6d 6d 6f 6e 20 72 65 61 73 6f 6e 73 20 Common reasons
1920: 61 72 65 3a 0d 0a 0d 0a 31 2e 20 59 6f 75 20 6d are:....1. You m
1930: 61 64 65 20 61 20 74 65 6d 70 6f 72 61 72 79 20 ade a temporary
1940: 63 68 61 6e 67 65 20 61 6e 64 20 66 6f 72 67 6f change and forgo
1950: 74 20 74 6f 20 72 65 76 65 72 74 20 69 74 20 62 t to revert it b
1960: 65 66 6f 72 65 20 63 6f 6d 6d 69 74 74 69 6e 67 efore committing
1970: 2e 0d 0a 32 2e 20 59 6f 75 20 6d 61 64 65 20 61 ...2. You made a
1980: 20 63 68 61 6e 67 65 20 74 6f 20 6f 6e 65 20 72 change to one r
1990: 6f 75 74 65 72 20 61 6e 64 20 66 6f 72 67 6f 74 outer and forgot
19a0: 20 74 6f 20 72 6f 6c 6c 20 69 74 20 6f 75 74 20 to roll it out
19b0: 74 68 72 6f 75 67 68 20 74 68 65 20 72 65 73 74 through the rest
19c0: 2e 0d 0a 33 2e 20 53 6f 6d 65 6f 6e 65 20 66 61 ...3. Someone fa
19d0: 74 2d 66 69 6e 67 65 72 65 64 20 61 20 63 68 61 t-fingered a cha
19e0: 6e 67 65 2c 20 61 6e 64 20 74 68 69 73 20 66 65 nge, and this fe
19f0: 61 74 75 72 65 20 63 61 75 67 68 74 20 74 68 65 ature caught the
1a00: 20 70 72 6f 62 6c 65 6d 20 66 6f 72 20 79 6f 75 problem for you
1a10: 2c 20 61 6c 6c 6f 77 69 6e 67 20 79 6f 75 20 74 , allowing you t
1a20: 6f 20 66 69 78 20 69 74 2e 0d 0a 0d 0a 42 65 63 o fix it.....Bec
1a30: 61 75 73 65 20 74 68 65 72 65 20 69 73 20 6e 6f ause there is no
1a40: 20 73 74 61 6e 64 61 72 64 20 67 72 61 70 68 69 standard graphi
1a50: 63 61 6c 20 64 69 66 66 20 70 72 6f 67 72 61 6d cal diff program
1a60: 2c 20 74 68 65 20 73 63 72 69 70 74 27 73 20 64 , the script's d
1a70: 65 66 61 75 6c 74 20 62 65 68 61 76 69 6f 72 20 efault behavior
1a80: 69 73 20 74 6f 20 70 72 6f 64 75 63 65 20 61 6e is to produce an
1a90: 20 48 54 4d 4c 20 64 69 66 66 20 61 6e 64 20 6f HTML diff and o
1aa0: 70 65 6e 20 69 74 20 69 6e 20 79 6f 75 72 20 77 pen it in your w
1ab0: 65 62 20 62 72 6f 77 73 65 72 2e 20 44 75 65 20 eb browser. Due
1ac0: 74 6f 20 74 68 65 20 6e 61 74 75 72 65 20 6f 66 to the nature of
1ad0: 20 77 65 62 20 62 72 6f 77 73 65 72 73 2c 20 46 web browsers, F
1ae0: 6f 73 73 69 6c 20 64 6f 65 73 6e 27 74 20 62 6c ossil doesn't bl
1af0: 6f 63 6b 20 61 6e 64 20 77 61 69 74 20 66 6f 72 ock and wait for
1b00: 20 74 68 65 20 62 72 6f 77 73 65 72 20 74 6f 20 the browser to
1b10: 63 6c 6f 73 65 20 62 65 66 6f 72 65 20 63 6f 6e close before con
1b20: 74 69 6e 75 69 6e 67 2c 20 73 6f 20 61 66 74 65 tinuing, so afte
1b30: 72 20 67 69 76 69 6e 67 20 74 68 65 20 62 72 6f r giving the bro
1b40: 77 73 65 72 20 74 69 6d 65 20 74 6f 20 6f 70 65 wser time to ope
1b50: 6e 20 74 68 65 20 74 65 6d 70 6f 72 61 72 79 20 n the temporary
1b60: 48 54 4d 4c 20 6f 75 74 70 75 74 20 66 69 6c 65 HTML output file
1b70: 2c 20 74 68 65 20 73 63 72 69 70 74 20 6d 6f 76 , the script mov
1b80: 65 73 20 6f 6e 20 74 6f 20 74 68 65 20 22 63 6f es on to the "co
1b90: 6d 6d 69 74 22 20 73 74 65 70 2e 20 53 69 6e 63 mmit" step. Sinc
1ba0: 65 20 74 68 61 74 20 73 74 65 70 20 2a 64 6f 65 e that step *doe
1bb0: 73 2a 20 62 6c 6f 63 6b 2c 20 69 74 20 6d 65 61 s* block, it mea
1bc0: 6e 73 20 74 68 65 20 73 63 72 69 70 74 20 77 61 ns the script wa
1bd0: 69 74 73 20 6f 6e 20 74 68 65 20 75 73 65 72 20 its on the user
1be0: 74 6f 20 70 72 6f 76 69 64 65 20 61 20 63 6f 6d to provide a com
1bf0: 6d 69 74 20 6d 65 73 73 61 67 65 2c 20 5b 70 65 mit message, [pe
1c00: 72 20 61 62 6f 76 65 5d 28 23 75 73 61 67 65 29 r above](#usage)
1c10: 2e 0d 0a 0d 0a 54 68 65 20 73 63 72 69 70 74 20 .....The script
1c20: 77 69 6c 6c 20 69 6e 73 74 65 61 64 20 75 73 65 will instead use
1c30: 20 61 6e 6f 74 68 65 72 20 67 72 61 70 68 69 63 another graphic
1c40: 61 6c 20 64 69 66 66 20 74 6f 6f 6c 20 69 66 20 al diff tool if
1c50: 6f 6e 65 20 69 73 20 63 6f 6e 66 69 67 75 72 65 one is configure
1c60: 64 2e 20 50 6f 70 75 6c 61 72 20 6f 70 74 69 6f d. Popular optio
1c70: 6e 73 20 66 6f 72 20 74 68 69 73 20 61 72 65 3a ns for this are:
1c80: 0d 0a 0d 0a 2a 20 5b 4d 65 6c 64 5d 28 68 74 74 ....* [Meld](htt
1c90: 70 73 3a 2f 2f 6d 65 6c 64 6d 65 72 67 65 2e 6f ps://meldmerge.o
1ca0: 72 67 2f 29 0d 0a 2a 20 5b 50 34 4d 65 72 67 65 rg/)..* [P4Merge
1cb0: 5d 28 68 74 74 70 73 3a 2f 2f 77 77 77 2e 70 65 ](https://www.pe
1cc0: 72 66 6f 72 63 65 2e 63 6f 6d 2f 70 72 6f 64 75 rforce.com/produ
1cd0: 63 74 73 2f 68 65 6c 69 78 2d 63 6f 72 65 2d 61 cts/helix-core-a
1ce0: 70 70 73 2f 6d 65 72 67 65 2d 64 69 66 66 2d 74 pps/merge-diff-t
1cf0: 6f 6f 6c 2d 70 34 6d 65 72 67 65 29 0d 0a 2a 20 ool-p4merge)..*
1d00: 5b 57 69 6e 4d 65 72 67 65 5d 28 68 74 74 70 73 [WinMerge](https
1d10: 3a 2f 2f 77 69 6e 6d 65 72 67 65 2e 6f 72 67 2f ://winmerge.org/
1d20: 29 0d 0a 0d 0a 54 68 65 20 6d 65 74 68 6f 64 20 )....The method
1d30: 6f 66 20 63 6f 6e 66 69 67 75 72 69 6e 67 20 65 of configuring e
1d40: 61 63 68 20 69 73 20 73 69 6d 69 6c 61 72 2e 20 ach is similar.
1d50: 41 73 73 75 6d 69 6e 67 20 74 68 65 79 27 72 65 Assuming they're
1d60: 20 69 6e 20 74 68 65 20 63 6f 6d 6d 61 6e 64 20 in the command
1d70: 70 61 74 68 2c 20 69 74 27 73 20 75 73 75 61 6c path, it's usual
1d80: 6c 79 20 61 73 20 73 69 6d 70 6c 65 20 61 73 3a ly as simple as:
1d90: 0d 0a 0d 0a 60 60 60 0d 0a 20 20 24 20 66 6f 73 ....```.. $ fos
1da0: 73 69 6c 20 73 65 74 20 67 64 69 66 66 2d 63 6f sil set gdiff-co
1db0: 6d 6d 61 6e 64 20 70 34 6d 65 72 67 65 0d 0a 60 mmand p4merge..`
1dc0: 60 60 0d 0a 0d 0a 49 66 20 79 6f 75 20 67 69 76 ``....If you giv
1dd0: 65 20 74 68 61 74 20 63 6f 6d 6d 61 6e 64 20 66 e that command f
1de0: 72 6f 6d 20 77 69 74 68 69 6e 20 74 68 69 73 20 rom within this
1df0: 73 63 72 69 70 74 27 73 20 63 68 65 63 6b 2d 6f script's check-o
1e00: 75 74 20 64 69 72 65 63 74 6f 72 79 20 e2 80 94 ut directory —
1e10: 20 5b 60 24 62 64 69 72 60 20 61 62 6f 76 65 5d [`$bdir` above]
1e20: 28 23 70 72 65 70 29 20 e2 80 94 20 69 74 20 61 (#prep) — it a
1e30: 66 66 65 63 74 73 20 6f 6e 6c 79 20 74 68 61 74 ffects only that
1e40: 20 6f 6e 65 20 46 6f 73 73 69 6c 20 72 65 70 6f one Fossil repo
1e50: 73 69 74 6f 72 79 2e 20 49 66 20 79 6f 75 20 77 sitory. If you w
1e60: 61 6e 74 20 74 68 65 20 73 65 74 74 69 6e 67 20 ant the setting
1e70: 74 6f 20 61 66 66 65 63 74 20 61 6c 6c 20 46 6f to affect all Fo
1e80: 73 73 69 6c 20 72 65 70 6f 73 20 6f 6e 20 74 68 ssil repos on th
1e90: 65 20 6d 61 63 68 69 6e 65 2c 20 79 6f 75 20 63 e machine, you c
1ea0: 61 6e 20 72 75 6e 20 69 74 20 66 72 6f 6d 20 61 an run it from a
1eb0: 6e 79 77 68 65 72 65 2c 20 67 69 76 69 6e 67 20 nywhere, giving
1ec0: 74 68 65 20 22 60 2d 67 60 22 20 66 6c 61 67 20 the "`-g`" flag
1ed0: 74 6f 20 6d 61 6b 65 20 69 74 20 61 66 66 65 63 to make it affec
1ee0: 74 20 74 68 65 20 67 6c 6f 62 61 6c 20 46 6f 73 t the global Fos
1ef0: 73 69 6c 20 63 6f 6e 66 69 67 75 72 61 74 69 6f sil configuratio
1f00: 6e 2e 0d 0a 0d 0a 0d 0a 23 23 20 3c 61 20 69 64 n.......## <a id
1f10: 3d 22 74 78 74 62 69 6e 22 3e 3c 2f 61 3e 57 68 ="txtbin"></a>Wh
1f20: 79 20 42 6f 74 68 20 42 69 6e 61 72 79 20 26 20 y Both Binary &
1f30: 54 65 78 74 20 42 61 63 6b 75 70 73 3f 0d 0a 0d Text Backups?...
1f40: 0a 54 68 65 20 73 63 72 69 70 74 20 64 6f 65 73 .The script does
1f50: 20 62 6f 74 68 20 62 69 6e 61 72 79 20 61 6e 64 both binary and
1f60: 20 74 65 78 74 20 62 61 63 6b 75 70 73 2e 20 28 text backups. (
1f70: 54 68 65 20 6c 61 74 74 65 72 20 61 72 65 20 61 The latter are a
1f80: 6c 73 6f 20 63 61 6c 6c 65 64 20 22 60 2f 65 78 lso called "`/ex
1f90: 70 6f 72 74 60 22 20 66 69 6c 65 73 20 6f 72 20 port`" files or
1fa0: 5b 52 53 43 20 66 69 6c 65 73 5d 5b 52 53 43 5d [RSC files][RSC]
1fb0: 2e 29 20 54 68 69 73 20 69 73 20 62 65 63 61 75 .) This is becau
1fc0: 73 65 20 74 65 78 74 20 62 61 63 6b 75 70 73 20 se text backups
1fd0: 64 6f 6e 27 74 20 61 6c 77 61 79 73 20 69 6e 63 don't always inc
1fe0: 6c 75 64 65 20 65 76 65 72 79 74 68 69 6e 67 20 lude everything
1ff0: 79 6f 75 20 77 61 6e 74 20 28 65 2e 67 2e 20 63 you want (e.g. c
2000: 65 72 74 69 66 69 63 61 74 65 73 2c 20 70 61 73 ertificates, pas
2010: 73 77 6f 72 64 73 29 2c 20 62 75 74 20 62 69 6e swords), but bin
2020: 61 72 79 20 62 61 63 6b 75 70 73 20 64 6f 6e 27 ary backups don'
2030: 74 20 61 6c 77 61 79 73 20 72 65 73 74 6f 72 65 t always restore
2040: 20 70 72 6f 70 65 72 6c 79 2e 20 54 65 78 74 20 properly. Text
2050: 62 61 63 6b 75 70 73 20 61 6c 73 6f 20 70 65 72 backups also per
2060: 6d 69 74 20 5b 64 69 66 66 73 5d 20 66 72 6f 6d mit [diffs] from
2070: 20 6f 6e 65 20 76 65 72 73 69 6f 6e 20 74 6f 20 one version to
2080: 74 68 65 20 6e 65 78 74 2e 0d 0a 0d 0a 49 20 68 the next.....I h
2090: 69 67 68 6c 79 20 72 65 63 6f 6d 6d 65 6e 64 20 ighly recommend
20a0: 74 68 61 74 20 79 6f 75 20 62 61 63 6b 75 70 20 that you backup
20b0: 65 6c 65 6d 65 6e 74 73 20 6f 66 20 79 6f 75 72 elements of your
20c0: 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 74 configuration t
20d0: 68 61 74 20 61 72 65 20 6f 6e 6c 79 20 73 74 6f hat are only sto
20e0: 72 65 64 20 69 6e 20 74 68 65 20 62 69 6e 61 72 red in the binar
20f0: 79 20 62 61 63 6b 75 70 20 73 65 70 61 72 61 74 y backup separat
2100: 65 6c 79 2e 20 46 6f 72 20 69 6e 73 74 61 6e 63 ely. For instanc
2110: 65 2c 20 79 6f 75 20 73 68 6f 75 6c 64 20 6b 65 e, you should ke
2120: 65 70 20 61 20 63 6f 70 79 20 6f 66 20 61 6c 6c ep a copy of all
2130: 20 58 2e 35 30 39 20 63 65 72 74 69 66 69 63 61 X.509 certifica
2140: 74 65 73 20 76 69 61 20 5b 74 68 65 20 52 6f 75 tes via [the Rou
2150: 74 65 72 4f 53 20 65 78 70 6f 72 74 20 66 75 6e terOS export fun
2160: 63 74 69 6f 6e 5d 5b 63 65 72 74 65 78 70 5d 2e ction][certexp].
2170: 20 2a 2a 4e 4f 54 45 3a 2a 2a 20 49 74 20 69 73 **NOTE:** It is
2180: 20 6e 65 63 65 73 73 61 72 79 20 74 6f 20 67 69 necessary to gi
2190: 76 65 20 74 68 65 20 22 65 78 70 6f 72 74 2d 70 ve the "export-p
21a0: 61 73 73 70 68 72 61 73 65 22 20 70 61 72 61 6d assphrase" param
21b0: 65 74 65 72 20 69 66 20 79 6f 75 20 77 61 6e 74 eter if you want
21c0: 20 74 68 65 20 72 65 73 75 6c 74 69 6e 67 20 50 the resulting P
21d0: 45 4d 20 66 69 6c 65 20 74 6f 20 69 6e 63 6c 75 EM file to inclu
21e0: 64 65 20 74 68 65 20 70 72 69 76 61 74 65 20 68 de the private h
21f0: 61 6c 66 20 6f 66 20 74 68 65 20 6b 65 79 2e 20 alf of the key.
2200: 57 69 74 68 6f 75 74 20 61 20 70 61 73 73 70 68 Without a passph
2210: 72 61 73 65 2c 20 52 6f 75 74 65 72 4f 53 20 67 rase, RouterOS g
2220: 69 76 65 73 20 79 6f 75 20 6f 6e 6c 79 20 74 68 ives you only th
2230: 65 20 70 75 62 6c 69 63 20 68 61 6c 66 2e 0d 0a e public half...
2240: 0d 0a 59 6f 75 20 6d 61 79 20 73 74 6f 72 65 20 ..You may store
2250: 73 75 63 68 20 66 69 6c 65 73 20 69 6e 20 74 68 such files in th
2260: 65 20 73 61 6d 65 20 46 6f 73 73 69 6c 20 72 65 e same Fossil re
2270: 70 6f 73 69 74 6f 72 79 20 74 68 61 74 20 74 68 pository that th
2280: 69 73 20 73 63 72 69 70 74 20 6d 61 6e 61 67 65 is script manage
2290: 73 2e 20 46 6f 72 20 69 6e 73 74 61 6e 63 65 2c s. For instance,
22a0: 20 79 6f 75 20 6d 61 79 20 70 6c 61 63 65 20 74 you may place t
22b0: 68 65 20 64 6f 77 6e 6c 6f 61 64 65 64 20 50 45 he downloaded PE
22c0: 4d 20 66 69 6c 65 73 20 75 6e 64 65 72 20 61 20 M files under a
22d0: 22 60 63 65 72 74 73 2f 60 22 20 73 75 62 64 69 "`certs/`" subdi
22e0: 72 65 63 74 6f 72 79 2e 20 54 68 65 20 73 63 72 rectory. The scr
22f0: 69 70 74 20 6f 6e 6c 79 20 74 72 65 61 74 73 20 ipt only treats
2300: 74 6f 70 2d 6c 65 76 65 6c 20 73 75 62 64 69 72 top-level subdir
2310: 65 63 74 6f 72 79 20 6e 61 6d 65 73 20 61 73 20 ectory names as
2320: 52 6f 75 74 65 72 4f 53 20 62 6f 78 20 68 6f 73 RouterOS box hos
2330: 74 6e 61 6d 65 73 20 69 66 20 74 68 65 79 20 63 tnames if they c
2340: 6f 6e 74 61 69 6e 20 61 20 60 63 6f 6e 66 69 67 ontain a `config
2350: 2e 62 69 6e 60 20 66 69 6c 65 2c 20 62 65 69 6e .bin` file, bein
2360: 67 20 74 68 65 20 52 6f 75 74 65 72 4f 53 20 62 g the RouterOS b
2370: 69 6e 61 72 79 20 63 6f 6e 66 69 67 75 72 61 74 inary configurat
2380: 69 6f 6e 20 62 61 63 6b 75 70 2e 20 45 76 65 72 ion backup. Ever
2390: 79 20 6f 74 68 65 72 20 66 69 6c 65 20 6f 72 20 y other file or
23a0: 64 69 72 65 63 74 6f 72 79 20 61 74 20 74 68 65 directory at the
23b0: 20 74 6f 70 20 6c 65 76 65 6c 20 6f 66 20 74 68 top level of th
23c0: 65 20 63 68 65 63 6b 2d 6f 75 74 20 e2 80 94 20 e check-out —
23d0: 5b 60 24 62 64 69 72 60 20 61 62 6f 76 65 5d 28 [`$bdir` above](
23e0: 23 70 72 65 70 29 20 e2 80 94 20 69 74 20 69 67 #prep) — it ig
23f0: 6e 6f 72 65 73 2e 0d 0a 0d 0a 5b 63 65 72 74 65 nores.....[certe
2400: 78 70 5d 3a 20 68 74 74 70 73 3a 2f 2f 68 65 6c xp]: https://hel
2410: 70 2e 6d 69 6b 72 6f 74 69 6b 2e 63 6f 6d 2f 64 p.mikrotik.com/d
2420: 6f 63 73 2f 64 69 73 70 6c 61 79 2f 52 4f 53 2f ocs/display/ROS/
2430: 43 65 72 74 69 66 69 63 61 74 65 73 23 43 65 72 Certificates#Cer
2440: 74 69 66 69 63 61 74 65 73 2d 45 78 70 6f 72 74 tificates-Export
2450: 43 65 72 74 69 66 69 63 61 74 65 0d 0a 0d 0a 0d Certificate.....
2460: 0a 23 23 20 3c 61 20 69 64 3d 22 61 6c 74 76 63 .## <a id="altvc
2470: 73 22 3e 3c 2f 61 3e 55 73 69 6e 67 20 41 6e 6f s"></a>Using Ano
2480: 74 68 65 72 20 56 43 53 0d 0a 0d 0a 54 68 69 73 ther VCS....This
2490: 20 73 63 72 69 70 74 20 72 65 6c 69 65 73 20 6f script relies o
24a0: 6e 20 6e 6f 20 69 72 72 65 70 6c 61 63 65 61 62 n no irreplaceab
24b0: 6c 65 20 46 6f 73 73 69 6c 2d 73 70 65 63 69 66 le Fossil-specif
24c0: 69 63 20 66 65 61 74 75 72 65 73 2e 20 54 68 65 ic features. The
24d0: 20 73 63 72 69 70 74 20 6d 61 6b 65 73 20 73 65 script makes se
24e0: 76 65 72 61 6c 20 63 61 6c 6c 73 20 74 6f 20 46 veral calls to F
24f0: 6f 73 73 69 6c 2c 20 62 75 74 20 65 61 63 68 20 ossil, but each
2500: 6f 6e 65 20 69 73 20 72 65 61 64 69 6c 79 20 72 one is readily r
2510: 65 70 6c 61 63 65 64 20 77 69 74 68 20 61 20 63 eplaced with a c
2520: 61 6c 6c 20 74 6f 20 61 6e 79 20 6f 74 68 65 72 all to any other
2530: 20 76 65 72 73 69 6f 6e 20 63 6f 6e 74 72 6f 6c version control
2540: 20 73 79 73 74 65 6d 20 79 6f 75 20 70 72 65 66 system you pref
2550: 65 72 2e 20 0d 0a 0d 0a 5b 47 69 74 5d 20 69 73 er. ....[Git] is
2560: 20 74 68 65 20 6d 6f 73 74 20 70 6f 70 75 6c 61 the most popula
2570: 72 20 56 43 53 20 61 74 20 74 68 65 20 6d 6f 6d r VCS at the mom
2580: 65 6e 74 2c 20 62 75 74 20 69 66 20 79 6f 75 20 ent, but if you
2590: 61 72 65 20 6f 6e 65 20 6f 66 20 69 74 73 20 66 are one of its f
25a0: 61 6e 73 2c 20 64 6f 20 72 65 61 6c 69 7a 65 20 ans, do realize
25b0: 74 68 61 74 20 46 6f 73 73 69 6c 20 70 72 6f 76 that Fossil prov
25c0: 69 64 65 73 20 65 76 65 72 79 74 68 69 6e 67 20 ides everything
25d0: 47 69 74 20 64 6f 65 73 20 74 68 61 74 20 6d 61 Git does that ma
25e0: 74 74 65 72 73 20 66 6f 72 20 74 68 69 73 20 61 tters for this a
25f0: 70 70 6c 69 63 61 74 69 6f 6e 20 77 69 74 68 6f pplication witho
2600: 75 74 20 62 72 69 6e 67 69 6e 67 20 61 6c 6f 6e ut bringing alon
2610: 67 20 61 6c 6c 20 6f 66 20 69 74 73 20 5b 75 6e g all of its [un
2620: 6e 65 63 65 73 73 61 72 79 20 63 6f 6d 70 6c 65 necessary comple
2630: 78 69 74 69 65 73 5d 5b 67 73 75 63 6b 73 5d 2e xities][gsucks].
2640: 20 59 6f 75 20 61 72 65 20 75 6e 6c 69 6b 65 6c You are unlikel
2650: 79 20 74 6f 20 68 61 76 65 20 61 20 62 65 74 74 y to have a bett
2660: 65 72 20 6a 75 73 74 69 66 69 63 61 74 69 6f 6e er justification
2670: 20 74 68 61 6e 20 73 69 6d 70 6c 65 20 69 6e 65 than simple ine
2680: 72 74 69 61 20 66 6f 72 20 75 73 69 6e 67 20 69 rtia for using i
2690: 74 3b 20 6e 6f 6e 65 20 6f 66 20 47 69 74 27 73 t; none of Git's
26a0: 20 75 6e 69 71 75 65 20 63 61 70 61 62 69 6c 69 unique capabili
26b0: 74 69 65 73 20 6d 61 74 74 65 72 20 66 6f 72 20 ties matter for
26c0: 74 68 69 73 20 61 70 70 6c 69 63 61 74 69 6f 6e this application
26d0: 2e 20 46 6f 72 20 69 6e 73 74 61 6e 63 65 2c 20 . For instance,
26e0: 6e 6f 20 73 65 6e 73 69 62 6c 65 20 6e 65 74 77 no sensible netw
26f0: 6f 72 6b 20 65 6e 67 69 6e 65 65 72 20 77 69 6c ork engineer wil
2700: 6c 20 70 75 62 6c 69 73 68 20 73 65 6e 73 69 74 l publish sensit
2710: 69 76 65 20 72 6f 75 74 65 72 20 62 61 63 6b 75 ive router backu
2720: 70 73 20 6f 6e 20 47 69 74 48 75 62 2c 20 61 6e ps on GitHub, an
2730: 64 20 65 76 65 6e 20 69 66 20 6f 6e 65 20 77 65 d even if one we
2740: 72 65 20 73 6f 20 66 6f 6f 6c 69 73 68 20 61 73 re so foolish as
2750: 20 74 6f 20 64 6f 20 73 6f 2c 20 74 68 65 72 65 to do so, there
2760: 20 69 73 20 61 6c 6c 20 62 75 74 20 7a 65 72 6f is all but zero
2770: 20 63 68 61 6e 63 65 20 74 68 61 74 20 61 6e 79 chance that any
2780: 6f 6e 65 20 77 6f 75 6c 64 20 66 6f 72 6b 20 74 one would fork t
2790: 68 61 74 20 72 65 70 6f 73 69 74 6f 72 79 2c 20 hat repository,
27a0: 6d 61 6b 65 20 69 6d 70 72 6f 76 65 6d 65 6e 74 make improvement
27b0: 73 2c 20 61 6e 64 20 70 75 73 68 20 61 20 50 52 s, and push a PR
27c0: 20 66 6f 72 20 74 68 65 20 72 65 70 6f 2e 20 47 for the repo. G
27d0: 69 74 20 63 61 6e 20 62 65 20 75 73 65 64 20 6f it can be used o
27e0: 6e 20 61 20 70 72 69 76 61 74 65 20 4c 41 4e 20 n a private LAN
27f0: 69 6e 73 74 65 61 64 2c 20 77 69 74 68 6f 75 74 instead, without
2800: 20 69 6e 76 6f 6c 76 69 6e 67 20 74 68 65 20 70 involving the p
2810: 75 62 6c 69 63 20 47 69 74 20 68 6f 73 74 69 6e ublic Git hostin
2820: 67 20 73 65 72 76 69 63 65 73 2c 20 62 75 74 20 g services, but
2830: 77 68 61 74 20 64 6f 65 73 20 74 68 61 74 20 62 what does that b
2840: 75 79 20 79 6f 75 20 6f 76 65 72 20 46 6f 73 73 uy you over Foss
2850: 69 6c 3f 0d 0a 0d 0a 41 20 62 65 74 74 65 72 20 il?....A better
2860: 61 6c 74 65 72 6e 61 74 69 76 65 20 77 6f 75 6c alternative woul
2870: 64 20 62 65 20 5b 53 75 62 76 65 72 73 69 6f 6e d be [Subversion
2880: 5d 5b 53 56 4e 5d 2c 20 62 65 69 6e 67 20 73 6d ][SVN], being sm
2890: 61 6c 6c 20 61 6e 64 20 63 6f 68 65 72 65 6e 74 all and coherent
28a0: 20 6c 69 6b 65 20 46 6f 73 73 69 6c 2c 20 74 68 like Fossil, th
28b0: 6f 75 67 68 20 6e 6f 74 20 6e 65 61 72 6c 79 20 ough not nearly
28c0: 73 6f 20 73 65 6c 66 2d 63 6f 6e 74 61 69 6e 65 so self-containe
28d0: 64 2c 20 66 65 61 74 75 72 65 66 75 6c 2c 20 6f d, featureful, o
28e0: 72 20 65 61 73 79 20 74 6f 20 61 64 6d 69 6e 69 r easy to admini
28f0: 73 74 65 72 2e 0d 0a 0d 0a 46 6f 72 20 64 61 79 ster.....For day
2900: 2d 74 6f 2d 64 61 79 20 75 73 65 2c 20 46 6f 73 -to-day use, Fos
2910: 73 69 6c 20 69 73 20 61 73 20 65 61 73 79 20 74 sil is as easy t
2920: 6f 20 75 73 65 20 61 73 20 5b 43 56 53 5d 20 77 o use as [CVS] w
2930: 68 69 6c 65 20 62 65 69 6e 67 20 6e 65 61 72 6c hile being nearl
2940: 79 20 61 73 20 70 6f 77 65 72 66 75 6c 20 61 73 y as powerful as
2950: 20 47 69 74 2e 0d 0a 0d 0a 41 6e 6f 74 68 65 72 Git.....Another
2960: 20 61 6c 74 65 72 6e 61 74 69 76 65 20 74 68 61 alternative tha
2970: 74 20 77 6f 75 6c 64 20 77 6f 72 6b 20 68 65 72 t would work her
2980: 65 2c 20 77 68 69 63 68 20 69 73 20 6d 6f 72 65 e, which is more
2990: 20 69 6e 20 6c 69 6e 65 20 77 69 74 68 20 74 68 in line with th
29a0: 65 20 73 69 6d 70 6c 69 63 69 74 79 20 6f 66 20 e simplicity of
29b0: 46 6f 73 73 69 6c 20 77 69 74 68 6f 75 74 20 61 Fossil without a
29c0: 6c 6c 20 6f 66 20 69 74 73 20 66 65 61 74 75 72 ll of its featur
29d0: 65 73 2c 20 69 73 20 5b 4d 65 72 63 75 72 69 61 es, is [Mercuria
29e0: 6c 5d 5b 68 67 5d 2e 0d 0a 0d 0a 5b 43 56 53 5d l][hg].....[CVS]
29f0: 3a 20 20 20 20 68 74 74 70 3a 2f 2f 63 76 73 2e : http://cvs.
2a00: 6e 6f 6e 67 6e 75 2e 6f 72 67 2f 0d 0a 5b 47 69 nongnu.org/..[Gi
2a10: 74 5d 3a 20 20 20 20 68 74 74 70 73 3a 2f 2f 67 t]: https://g
2a20: 69 74 2d 73 63 6d 2e 63 6f 6d 2f 0d 0a 5b 67 73 it-scm.com/..[gs
2a30: 75 63 6b 73 5d 3a 20 68 74 74 70 73 3a 2f 2f 64 ucks]: https://d
2a40: 75 63 6b 64 75 63 6b 67 6f 2e 63 6f 6d 2f 3f 71 uckduckgo.com/?q
2a50: 3d 67 69 74 2b 73 75 63 6b 73 0d 0a 5b 68 67 5d =git+sucks..[hg]
2a60: 3a 20 20 20 20 20 68 74 74 70 73 3a 2f 2f 6d 65 : https://me
2a70: 72 63 75 72 69 61 6c 2d 73 63 6d 2e 6f 72 67 0d rcurial-scm.org.
2a80: 0a 5b 56 43 53 65 73 5d 3a 20 20 68 74 74 70 73 .[VCSes]: https
2a90: 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 64 69 61 2e ://en.wikipedia.
2aa0: 6f 72 67 2f 77 69 6b 69 2f 56 65 72 73 69 6f 6e org/wiki/Version
2ab0: 5f 63 6f 6e 74 72 6f 6c 0d 0a 5b 53 56 4e 5d 3a _control..[SVN]:
2ac0: 20 20 20 20 68 74 74 70 73 3a 2f 2f 73 75 62 76 https://subv
2ad0: 65 72 73 69 6f 6e 2e 61 70 61 63 68 65 2e 6f 72 ersion.apache.or
2ae0: 67 2f 0d 0a 0d 0a 0d 0a 0d 0a 0d 0a 23 23 20 4b g/..........## K
2af0: 6e 6f 77 6e 20 57 65 61 6b 6e 65 73 73 65 73 0d nown Weaknesses.
2b00: 0a 0d 0a 23 23 23 20 50 65 72 69 6f 64 69 63 20 ...### Periodic
2b10: 43 6c 65 61 6e 75 70 0d 0a 0d 0a 54 68 65 20 63 Cleanup....The c
2b20: 75 72 72 65 6e 74 20 76 65 72 73 69 6f 6e 20 6f urrent version o
2b30: 66 20 74 68 69 73 20 73 63 72 69 70 74 20 64 6f f this script do
2b40: 65 73 6e 27 74 20 70 75 72 67 65 20 6f 6c 64 20 esn't purge old
2b50: 62 69 6e 61 72 79 20 62 61 63 6b 75 70 73 20 75 binary backups u
2b60: 6e 64 65 72 20 46 69 6c 65 73 20 6f 6e 20 65 61 nder Files on ea
2b70: 63 68 20 52 6f 75 74 65 72 4f 53 20 62 6f 78 2e ch RouterOS box.
2b80: 20 49 74 27 73 20 70 6f 73 73 69 62 6c 65 20 74 It's possible t
2b90: 6f 20 72 75 6e 20 74 68 69 73 20 73 63 72 69 70 o run this scrip
2ba0: 74 20 65 6e 6f 75 67 68 20 74 69 6d 65 73 20 74 t enough times t
2bb0: 68 61 74 20 79 6f 75 20 66 69 6c 6c 20 74 68 65 hat you fill the
2bc0: 20 66 6c 61 73 68 2c 20 70 72 65 76 65 6e 74 69 flash, preventi
2bd0: 6e 67 20 6f 70 65 72 61 74 69 6f 6e 73 20 6c 69 ng operations li
2be0: 6b 65 20 52 6f 75 74 65 72 4f 53 20 76 65 72 73 ke RouterOS vers
2bf0: 69 6f 6e 20 75 70 67 72 61 64 65 73 20 66 72 6f ion upgrades fro
2c00: 6d 20 77 6f 72 6b 69 6e 67 2e 20 0d 0a 0d 0a 4d m working. ....M
2c10: 6f 64 69 66 79 69 6e 67 20 74 68 65 20 73 63 72 odifying the scr
2c20: 69 70 74 20 74 6f 20 61 75 74 6f 6d 61 74 69 63 ipt to automatic
2c30: 61 6c 6c 79 20 70 75 72 67 65 20 6f 6c 64 20 62 ally purge old b
2c40: 61 63 6b 75 70 73 20 77 6f 75 6c 64 6e 27 74 20 ackups wouldn't
2c50: 62 65 20 64 69 66 66 69 63 75 6c 74 2e 20 49 20 be difficult. I
2c60: 73 69 6d 70 6c 79 20 68 61 76 65 6e 27 74 20 62 simply haven't b
2c70: 6f 74 68 65 72 65 64 20 73 69 6e 63 65 20 49 20 othered since I
2c80: 72 75 6e 20 74 68 69 73 20 74 6f 6f 6c 20 6f 6e run this tool on
2c90: 6c 79 20 61 74 20 6e 65 65 64 2c 20 6e 6f 74 20 ly at need, not
2ca0: 70 65 72 69 6f 64 69 63 61 6c 6c 79 2c 20 73 6f periodically, so
2cb0: 20 74 68 65 79 20 64 6f 6e 27 74 20 62 75 69 6c they don't buil
2cc0: 64 20 75 70 20 74 6f 20 74 68 61 74 20 70 6f 69 d up to that poi
2cd0: 6e 74 20 76 65 72 79 20 66 61 73 74 2e 20 45 76 nt very fast. Ev
2ce0: 65 6e 20 6f 6e 20 61 20 73 6d 61 6c 6c 20 52 6f en on a small Ro
2cf0: 75 74 65 72 4f 53 20 62 6f 78 20 6c 69 6b 65 20 uterOS box like
2d00: 61 20 5b 68 45 58 5d 2c 20 77 69 74 68 20 69 74 a [hEX], with it
2d10: 73 20 70 69 64 64 6c 69 6e 27 20 31 36 c2 a0 4d s piddlin' 16 M
2d20: 69 42 20 6f 66 20 66 6c 61 73 68 2c 20 79 6f 75 iB of flash, you
2d30: 20 63 61 6e 20 64 6f 20 31 30 20 6f 72 20 73 6f can do 10 or so
2d40: 20 62 61 63 6b 75 70 73 20 62 65 66 6f 72 65 20 backups before
2d50: 79 6f 75 20 73 74 61 72 74 20 63 61 75 73 69 6e you start causin
2d60: 67 20 74 68 69 73 20 70 72 6f 62 6c 65 6d 2e 0d g this problem..
2d70: 0a 0d 0a 41 75 74 6f 6d 61 74 69 63 20 63 6c 65 ...Automatic cle
2d80: 61 6e 75 70 20 77 6f 75 6c 64 20 6d 61 74 74 65 anup would matte
2d90: 72 20 69 66 20 79 6f 75 20 72 61 6e 20 74 68 69 r if you ran thi
2da0: 73 20 73 63 72 69 70 74 20 70 65 72 69 6f 64 69 s script periodi
2db0: 63 61 6c 6c 79 2e 20 50 61 74 63 68 65 73 20 74 cally. Patches t
2dc0: 68 6f 75 67 68 74 66 75 6c 6c 79 20 63 6f 6e 73 houghtfully cons
2dd0: 69 64 65 72 65 64 2e 0d 0a 0d 0a 0d 0a 23 23 23 idered.......###
2de0: 20 43 68 61 6e 67 65 20 44 65 74 65 63 74 69 6f Change Detectio
2df0: 6e 0d 0a 0d 0a 54 68 65 20 73 63 72 69 70 74 20 n....The script
2e00: 61 74 74 65 6d 70 74 73 20 74 6f 20 64 65 74 65 attempts to dete
2e10: 63 74 20 77 68 65 74 68 65 72 20 74 68 65 72 65 ct whether there
2e20: 20 61 72 65 20 6d 65 61 6e 69 6e 67 66 75 6c 20 are meaningful
2e30: 63 68 61 6e 67 65 73 20 74 6f 20 74 68 65 20 72 changes to the r
2e40: 6f 75 74 65 72 20 63 6f 6e 66 69 67 75 72 61 74 outer configurat
2e50: 69 6f 6e 20 62 65 66 6f 72 65 20 64 6f 69 6e 67 ion before doing
2e60: 20 61 20 63 6f 6d 6d 69 74 2c 20 74 6f 20 61 76 a commit, to av
2e70: 6f 69 64 20 62 61 6c 6c 6f 6f 6e 69 6e 67 20 74 oid ballooning t
2e80: 68 65 20 72 65 70 6f 20 77 69 74 68 20 75 6e 6e he repo with unn
2e90: 65 63 65 73 73 61 72 79 20 62 61 63 6b 75 70 73 ecessary backups
2ea0: 2e 20 49 74 20 64 6f 65 73 20 74 68 69 73 20 62 . It does this b
2eb0: 79 20 6c 6f 6f 6b 69 6e 67 20 61 74 20 64 69 66 y looking at dif
2ec0: 66 73 20 6f 66 20 74 68 65 20 74 65 78 74 20 62 fs of the text b
2ed0: 61 63 6b 75 70 20 66 69 6c 65 2c 20 77 68 69 63 ackup file, whic
2ee0: 68 20 6d 65 61 6e 73 20 69 74 20 63 61 6e 20 62 h means it can b
2ef0: 65 20 66 6f 6f 6c 65 64 20 69 66 20 79 6f 75 20 e fooled if you
2f00: 6d 61 6b 65 20 61 20 63 68 61 6e 67 65 20 61 66 make a change af
2f10: 66 65 63 74 73 20 6f 6e 6c 79 20 74 68 65 20 62 fects only the b
2f20: 69 6e 61 72 79 20 62 61 63 6b 75 70 20 66 69 6c inary backup fil
2f30: 65 2c 20 73 75 63 68 20 61 73 20 75 70 64 61 74 e, such as updat
2f40: 69 6e 67 20 61 20 63 65 72 74 69 66 69 63 61 74 ing a certificat
2f50: 65 2e 0d 0a 0d 0a 28 42 79 20 63 6f 6e 74 72 61 e.....(By contra
2f60: 73 74 2c 20 2a 61 64 64 69 6e 67 2a 20 61 20 63 st, *adding* a c
2f70: 65 72 74 69 66 69 63 61 74 65 20 69 73 20 6c 69 ertificate is li
2f80: 6b 65 6c 79 20 74 6f 20 72 65 71 75 69 72 65 20 kely to require
2f90: 61 20 63 68 61 6e 67 65 20 74 68 65 20 74 65 78 a change the tex
2fa0: 74 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 t configuration
2fb0: 61 73 20 77 65 6c 6c 2c 20 73 69 6e 63 65 20 79 as well, since y
2fc0: 6f 75 20 77 69 6c 6c 20 6e 65 65 64 20 74 6f 20 ou will need to
2fd0: 72 65 66 65 72 65 6e 63 65 20 74 68 61 74 20 6e reference that n
2fe0: 65 77 20 63 65 72 74 69 66 69 63 61 74 65 20 66 ew certificate f
2ff0: 72 6f 6d 20 73 6f 6d 65 77 68 65 72 65 2c 20 65 rom somewhere, e
3000: 6c 73 65 20 77 68 79 20 63 72 65 61 74 65 20 69 lse why create i
3010: 74 3f 20 50 6f 73 73 69 62 6c 65 20 61 6e 73 77 t? Possible answ
3020: 65 72 3a 20 79 6f 75 27 72 65 20 75 73 69 6e 67 er: you're using
3030: 20 74 68 65 20 52 6f 75 74 65 72 4f 53 20 62 6f the RouterOS bo
3040: 78 20 61 73 20 61 20 43 41 2c 20 61 6e 64 20 79 x as a CA, and y
3050: 6f 75 27 76 65 20 61 64 64 65 64 20 74 68 65 20 ou've added the
3060: 63 65 72 74 69 66 69 63 61 74 65 20 6f 6e 6c 79 certificate only
3070: 20 74 6f 20 63 6f 70 79 20 69 74 20 74 6f 20 61 to copy it to a
3080: 6e 6f 74 68 65 72 20 62 6f 78 2c 20 69 6e 20 77 nother box, in w
3090: 68 69 63 68 20 63 61 73 65 20 79 6f 75 27 72 65 hich case you're
30a0: 20 62 61 63 6b 20 69 6e 20 74 68 65 20 73 6f 75 back in the sou
30b0: 70 2e 29 0d 0a 0d 0a 57 68 69 6c 65 20 74 68 65 p.)....While the
30c0: 20 73 63 72 69 70 74 20 63 61 6e 20 63 65 72 74 script can cert
30d0: 61 69 6e 6c 79 20 64 65 74 65 63 74 20 77 68 65 ainly detect whe
30e0: 6e 20 74 68 65 20 62 69 6e 61 72 79 20 62 61 63 n the binary bac
30f0: 6b 75 70 20 66 69 6c 65 20 63 68 61 6e 67 65 73 kup file changes
3100: 2c 20 52 6f 75 74 65 72 4f 53 20 73 65 65 6d 73 , RouterOS seems
3110: 20 74 6f 20 69 6e 63 6c 75 64 65 20 70 6f 69 6e to include poin
3120: 74 6c 65 73 73 20 74 69 6e 79 20 63 68 61 6e 67 tless tiny chang
3130: 65 73 20 65 61 63 68 20 74 69 6d 65 2c 20 73 6f es each time, so
3140: 20 77 65 20 63 61 6e 6e 6f 74 20 64 69 73 74 69 we cannot disti
3150: 6e 67 75 69 73 68 20 22 69 74 20 63 68 61 6e 67 nguish "it chang
3160: 65 64 22 20 66 72 6f 6d 20 22 69 74 20 6e 65 65 ed" from "it nee
3170: 64 73 20 74 6f 20 62 65 20 62 61 63 6b 65 64 20 ds to be backed
3180: 75 70 2e 22 0d 0a 0d 0a 49 20 73 65 65 20 6d 75 up."....I see mu
3190: 6c 74 69 70 6c 65 20 70 6f 73 73 69 62 6c 65 20 ltiple possible
31a0: 73 6f 6c 75 74 69 6f 6e 73 3a 0d 0a 0d 0a 31 2e solutions:....1.
31b0: 20 20 52 69 70 20 74 68 65 20 63 68 61 6e 67 65 Rip the change
31c0: 20 64 65 74 65 63 74 69 6f 6e 20 6f 75 74 20 61 detection out a
31d0: 6e 64 20 63 6f 6d 6d 69 74 20 61 20 62 61 63 6b nd commit a back
31e0: 75 70 20 65 61 63 68 20 74 69 6d 65 2e 20 54 68 up each time. Th
31f0: 65 6e 2c 20 65 69 74 68 65 72 20 72 65 6c 79 20 en, either rely
3200: 6f 6e 20 74 68 65 20 75 73 65 72 20 74 6f 20 6b on the user to k
3210: 6e 6f 77 20 77 68 65 6e 20 61 20 62 61 63 6b 75 now when a backu
3220: 70 20 6e 65 65 64 73 20 64 6f 69 6e 67 2c 20 6f p needs doing, o
3230: 72 20 63 6f 70 65 20 77 69 74 68 20 74 68 65 20 r cope with the
3240: 66 61 63 74 20 74 68 61 74 20 74 68 65 20 72 65 fact that the re
3250: 70 6f 20 77 69 6c 6c 20 67 72 6f 77 20 6f 6e 20 po will grow on
3260: 65 61 63 68 20 62 61 63 6b 75 70 20 65 76 65 6e each backup even
3270: 20 69 66 20 74 68 65 72 65 20 69 73 20 6e 6f 20 if there is no
3280: 73 75 62 73 74 61 6e 74 69 61 6c 20 63 68 61 6e substantial chan
3290: 67 65 20 69 6e 20 74 68 65 20 76 65 72 73 69 6f ge in the versio
32a0: 6e 73 2e 20 41 20 6d 69 74 69 67 61 74 69 6e 67 ns. A mitigating
32b0: 20 66 61 63 74 6f 72 20 69 73 20 74 68 61 74 20 factor is that
32c0: 74 68 69 73 20 73 63 68 65 6d 65 20 68 61 73 20 this scheme has
32d0: 5b 73 74 72 6f 6e 67 20 63 6f 6d 70 72 65 73 73 [strong compress
32e0: 69 6f 6e 5d 28 23 63 6f 6d 70 72 65 73 73 69 6f ion](#compressio
32f0: 6e 29 20 74 6f 20 63 6f 6e 74 72 6f 6c 20 74 68 n) to control th
3300: 65 20 72 65 70 6f 20 73 69 7a 65 20 67 72 6f 77 e repo size grow
3310: 74 68 2e 0d 0a 0d 0a 32 2e 20 20 41 64 64 20 61 th.....2. Add a
3320: 20 22 60 2d 2d 66 6f 72 63 65 60 22 20 66 6c 61 "`--force`" fla
3330: 67 20 74 6f 20 6d 61 6b 65 20 69 74 20 73 6b 69 g to make it ski
3340: 70 20 74 68 65 20 63 68 61 6e 67 65 20 64 65 74 p the change det
3350: 65 63 74 69 6f 6e 2e 0d 0a 0d 0a 33 2e 20 20 4d ection.....3. M
3360: 61 6b 65 20 69 74 20 61 20 70 72 61 63 74 69 63 ake it a practic
3370: 65 20 74 6f 20 63 68 61 6e 67 65 20 73 6f 6d 65 e to change some
3380: 74 68 69 6e 67 20 69 6e 20 74 68 65 20 63 6f 6e thing in the con
3390: 66 69 67 75 72 61 74 69 6f 6e 20 74 68 61 74 20 figuration that
33a0: 73 68 6f 77 73 20 75 70 20 69 6e 20 74 68 65 20 shows up in the
33b0: 60 2f 65 78 70 6f 72 74 60 20 6f 75 74 70 75 74 `/export` output
33c0: 20 65 61 63 68 20 74 69 6d 65 20 79 6f 75 20 6d each time you m
33d0: 61 6b 65 20 61 20 63 68 61 6e 67 65 20 74 68 61 ake a change tha
33e0: 74 20 6f 6e 6c 79 20 61 66 66 65 63 74 73 20 74 t only affects t
33f0: 68 65 20 62 61 63 6b 75 70 2e 20 46 6f 72 20 69 he backup. For i
3400: 6e 73 74 61 6e 63 65 2c 20 69 66 20 79 6f 75 20 nstance, if you
3410: 75 70 64 61 74 65 64 20 61 20 63 65 72 74 69 66 updated a certif
3420: 69 63 61 74 65 20 66 6f 72 20 6f 6e 65 20 6f 66 icate for one of
3430: 20 79 6f 75 72 20 49 50 53 65 63 20 63 6c 69 65 your IPSec clie
3440: 6e 74 73 2c 20 79 6f 75 20 63 6f 75 6c 64 20 64 nts, you could d
3450: 6f 63 75 6d 65 6e 74 20 74 68 65 20 63 68 61 6e ocument the chan
3460: 67 65 20 69 6e 20 74 68 65 20 60 63 6f 6d 6d 65 ge in the `comme
3470: 6e 74 3d 60 20 6f 6e 20 74 68 61 74 20 63 6c 69 nt=` on that cli
3480: 65 6e 74 27 73 20 60 2f 69 6e 74 65 72 66 61 63 ent's `/interfac
3490: 65 60 20 65 6e 74 72 79 2e 20 54 68 65 6e 20 62 e` entry. Then b
34a0: 6f 74 68 20 74 68 65 20 62 69 6e 61 72 79 20 61 oth the binary a
34b0: 6e 64 20 74 65 78 74 20 62 61 63 6b 75 70 73 20 nd text backups
34c0: 73 68 6f 77 20 74 68 65 20 73 61 6d 65 20 63 68 show the same ch
34d0: 61 6e 67 65 2e 0d 0a 0d 0a 5b 64 69 66 66 5d 3a ange.....[diff]:
34e0: 20 68 74 74 70 73 3a 2f 2f 65 6e 2e 77 69 6b 69 https://en.wiki
34f0: 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69 2f 44 pedia.org/wiki/D
3500: 69 66 66 0d 0a 5b 68 45 58 5d 3a 20 20 68 74 74 iff..[hEX]: htt
3510: 70 73 3a 2f 2f 6d 69 6b 72 6f 74 69 6b 2e 63 6f ps://mikrotik.co
3520: 6d 2f 70 72 6f 64 75 63 74 2f 52 42 37 35 30 47 m/product/RB750G
3530: 72 33 0d 0a 5b 52 53 43 5d 3a 20 20 68 74 74 70 r3..[RSC]: http
3540: 73 3a 2f 2f 77 69 6b 69 2e 6d 69 6b 72 6f 74 69 s://wiki.mikroti
3550: 6b 2e 63 6f 6d 2f 77 69 6b 69 2f 4d 61 6e 75 61 k.com/wiki/Manua
3560: 6c 3a 43 6f 6e 66 69 67 75 72 61 74 69 6f 6e 5f l:Configuration_
3570: 4d 61 6e 61 67 65 6d 65 6e 74 0d 0a 0d 0a 0d 0a Management......
3580: 3c 64 69 76 20 73 74 79 6c 65 3d 22 6d 69 6e 2d <div style="min-
3590: 68 65 69 67 68 74 3a 35 30 65 6d 22 3e 3c 2f 64 height:50em"></d
35a0: 69 76 3e 0a 5a 20 39 39 37 66 35 34 30 64 30 37 iv>.Z 997f540d07
35b0: 61 36 30 31 36 37 35 64 39 32 32 30 33 38 34 32 a601675d92203842
35c0: 66 66 65 31 32 61 0a ffe12a.