I need help with my backup script

Your script does not perform a backup for all the directories for which you defined a path variable:

  • DOCS         [OK]
  • SCRIPTS         [OK]
  • HOME         [MISSING code segment]
  • ICONS         [missing cp command]
  • MY_Sounds         [MISSING code segment]
  • THUNAR         [OK]
  • Music         [MISSING code segment]
  • FedEx         [MISSING code segment]

You might also want to consider replacing the suffix matching strings with regex, namely

*.[Tt][Xx][Tt]
*.[Dd][Oo][Cc]
*.[Rr][Tt][Ff]
*.[Hh][Tt][Mm][Ll]
*.[Pp][Dd][Ff]
*.[Oo][Dd][Tt]
*.[Oo][Dd][Ss]
*.[Oo][Dd][Gg]
*.[Cc][Ss][Vv]
*.[Xx][Ll][Ss]
*.[Jj][Pp][Gg]
*.[Dd][Oo][Cc][Xx]
*.[Oo][Tt][Gg]
*.[Dd][Oo][Cc]

You could use this script to generate those patterns using the command

USER__Find_IndexedFiles.sh --pattern txt doc rtf html png pdf odt ods odg csv xls jpg docx otg doc

to give you the result

	 [Tt][Xx][Tt]
	 [Dd][Oo][Cc]
	 [Rr][Tt][Ff]
	 [Hh][Tt][Mm][Ll]
	 [Pp][Nn][Gg]
	 [Pp][Dd][Ff]
	 [Oo][Dd][Tt]
	 [Oo][Dd][Ss]
	 [Oo][Dd][Gg]
	 [Cc][Ss][Vv]
	 [Xx][Ll][Ss]
	 [Jj][Pp][Gg]
	 [Dd][Oo][Cc][Xx]
	 [Oo][Tt][Gg]
	 [Dd][Oo][Cc]

:slight_smile:

4 Likes