(command.BraceGroup children: [ (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:INPUT) op:assign_op.Equal rhs:{<0>} spids:[95])] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_EqualTilde left: {($ Id.VSub_Number '$1')} right: {<Id.Lit_Other '^'> <-> <Id.Lit_Other '?'> <Id.Lit_Other '['> <0-9> <Id.Lit_Other ']'> <Id.Lit_Other '+'> <Id.Lit_Other '$'> } ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:INPUT) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [122] ) ] ) ] spids: [99 119] ) ] ) (C {<.>} {</DietPi/dietpi/func/dietpi-globals>}) (C {<G_CHECK_ROOT_USER>}) (C {<G_CHECK_ROOTFS_RW>}) (C {<export>} {<Id.Lit_VarLike 'G_PROGRAM_NAME='> (SQ <DietPi-Backup>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:WHIP_BACKTITLE) op: assign_op.Equal rhs: {(SQ <DietPi-Backup>)} spids: [170] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:WHIP_TITLE) op: assign_op.Equal rhs: {(SQ )} spids: [176] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:MENU_LASTITEM) op: assign_op.Equal rhs: {(SQ )} spids: [181] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CHOICE) op: assign_op.Equal rhs: {<0>} spids: [186] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:OPTION) op: assign_op.Equal rhs: {<0>} spids: [190] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TARGETMENUID) op: assign_op.Equal rhs: {<0>} spids: [194] ) ] ) (command.ShFunction name: Menu_Main body: (command.BraceGroup children: [ (C {<local>} {<Id.Lit_VarLike 'backup_last_completed_system='> (SQ <'System backup not found. Create one.'>) } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-f>} { (DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP') </> ($ Id.VSub_DollarName '$BACKUP_STATS_FILENAME_SYSTEM') ) } {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:backup_last_completed_system) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<grep>} {(SQ <Completed>)} { (DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP') </> ($ Id.VSub_DollarName '$BACKUP_STATS_FILENAME_SYSTEM') ) } ) (C {<tail>} {<-1>}) ] negated: F ) ] ) ) } spids: [237] ) ] ) ] spids: [218 233] ) ] ) (C {<local>} {<Id.Lit_VarLike 'backup_last_completed_userdata='> (SQ <'User data backup not found (requires "Full" backup mode)'>) } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-f>} { (DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP') </> ($ Id.VSub_DollarName '$BACKUP_STATS_FILENAME_USERDATA') ) } {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:backup_last_completed_userdata) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<grep>} {(SQ <Completed>)} { (DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP') </> ($ Id.VSub_DollarName '$BACKUP_STATS_FILENAME_USERDATA' ) ) } ) (C {<tail>} {<-1>}) ] negated: F ) ] ) ) } spids: [291] ) ] ) ] spids: [272 287] ) ] ) (C {<local>} {<Id.Lit_VarLike 'text_backup_mode='> (SQ <'System only'>)}) (C {<local>} {<Id.Lit_VarLike 'text_start_mode_desc='> (SQ <system>)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$BACKUP_MODE')}) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:text_backup_mode) op: assign_op.Equal rhs: {(SQ <Full>)} spids: [352] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:text_start_mode_desc) op: assign_op.Equal rhs: {(SQ <'system and user data'>)} spids: [358] ) ] ) ] spids: [334 348] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:WHIP_TITLE) op: assign_op.Equal rhs: {(SQ <DietPi-Backup>)} spids: [369] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:OPTION) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Simple words: [ {<whiptail>} {<--title>} {(DQ ($ Id.VSub_DollarName '$WHIP_TITLE'))} {<--menu>} { (DQ <'Current backup and restore location:'> <Id.Lit_Other '\\'> <'n - '> ($ Id.VSub_DollarName '$FP_TARGET_BACKUP') <Id.Lit_Other '\\'> <'n - '> ($ Id.VSub_DollarName '$backup_last_completed_system') <Id.Lit_Other '\\'> <'n - '> ($ Id.VSub_DollarName '$backup_last_completed_userdata') ) } {<--cancel-button>} {(DQ <Exit>)} {<--default-item>} {(DQ ($ Id.VSub_DollarName '$MENU_LASTITEM'))} {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$WHIP_BACKTITLE'))} {<16>} {<80>} {<5>} {(DQ <Help>)} {(DQ <'What does DietPi-Backup do?'>)} {(DQ <Location>)} {(DQ <'Change where your backup will be saved and restored from.'>)} {(DQ <'Backup mode'>)} {(DQ <': '> ($ Id.VSub_DollarName '$text_backup_mode'))} {(DQ <Backup>)} {(DQ <'Create (or update) a backup of this system.'>)} {(DQ <Restore>)} {(DQ <'Restore this system from a previous backup.'>)} ] redirects: [ (redir.Redir op: <Id.Redir_GreatAnd '3>&'> fd: 3 arg_word: {<1>} ) (redir.Redir op: <Id.Redir_GreatAnd '1>&'> fd: 1 arg_word: {<2>} ) (redir.Redir op: <Id.Redir_GreatAnd '2>&'> fd: 2 arg_word: {<3>} ) ] ) ] ) ) } spids: [375] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CHOICE) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [487] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$CHOICE')}) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:MENU_LASTITEM) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$OPTION'))} spids: [509] ) ] ) (command.Case to_match: {(DQ ($ Id.VSub_DollarName '$OPTION'))} arms: [ (case_arm pat_list: [{<Location>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TARGETMENUID) op: assign_op.Equal rhs: {<1>} spids: [531] ) ] ) ] spids: [526 527 536 -1] ) (case_arm pat_list: [{(DQ <'Backup mode'>)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:OPTION) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Simple words: [ {<whiptail>} {<--title>} {(DQ ($ Id.VSub_DollarName '$WHIP_TITLE'))} {<--menu>} { (DQ <'Please select a backup mode:'> <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <'n - System only'> <Id.Lit_Other '\\'> < 'nOnly the system is backed up and restored, this does not include your DietPi user data (' > ($ Id.VSub_DollarName '$G_FP_DIETPI_USERDATA') <').'> <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <'n - Full:'> <Id.Lit_Other '\\'> <'nSystem and user data ('> ($ Id.VSub_DollarName '$G_FP_DIETPI_USERDATA') <') is backed up and restored.'> <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <'nMore information on what DietPi user data is:'> <Id.Lit_Other '\\'> <'nhttp://dietpi.com/phpbb/viewtopic.php?f=8&t=478#p2087'> ) } {<--cancel-button>} {(DQ <Exit>)} {<--default-item>} {(DQ ($ Id.VSub_DollarName '$BACKUP_MODE'))} {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$WHIP_BACKTITLE'))} {<20>} {<80>} {<2>} {(DQ <0>)} {(DQ <'System only'>)} {(DQ <1>)} {(DQ <'Full (includes user data)'>)} ] redirects: [ (redir.Redir op: <Id.Redir_GreatAnd '3>&'> fd: 3 arg_word: {<1>} ) (redir.Redir op: <Id.Redir_GreatAnd '1>&'> fd: 1 arg_word: {<2>} ) (redir.Redir op: <Id.Redir_GreatAnd '2>&'> fd: 2 arg_word: {<3>} ) ] ) ] ) ) } spids: [547] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CHOICE) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [640] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$CHOICE')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BACKUP_MODE) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$OPTION')} spids: [662] ) ] ) ] spids: [644 658] ) ] ) ] spids: [540 543 671 -1] ) (case_arm pat_list: [{<Help>}] action: [ (C {<whiptail>} {<--title>} {(DQ <'DietPi-Backup Help'>)} {<--msgbox>} { (DQ < 'DietPi-Backup is a program that allows you to Backup and Restore your DietPi system.' > <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> < 'nIf you have broken your system, or want to reset your system to an earlier date, this can all be done with DietPi-Backup.' > <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> < 'nSimply choose a location where you want to save and restore your backups from, then, select Backup or Restore.' > <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <'nMore information:'> <Id.Lit_Other '\\'> <'n - http://dietpi.com/phpbb/viewtopic.php?f=8&t=5&p=256#p255'> ) } {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$WHIP_BACKTITLE'))} {<20>} {<75>} ) ] spids: [675 676 720 -1] ) (case_arm pat_list: [{<Backup>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:WHIP_TITLE) op: assign_op.Equal rhs: {(SQ <' Start backup? '>)} spids: [729] ) ] ) (C {<whiptail>} {<--title>} {(DQ ($ Id.VSub_DollarName '$WHIP_TITLE'))} {<--yesno>} { (DQ <'Your '> ($ Id.VSub_DollarName '$text_start_mode_desc') <' will be backed up to:'> <Id.Lit_Other '\\'> <n> ($ Id.VSub_DollarName '$FP_TARGET_BACKUP') <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <'nDo you wish to continue?'> ) } {<--yes-button>} {(DQ <Ok>)} {<--no-button>} {(DQ <Back>)} {<--defaultno>} {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$WHIP_BACKTITLE'))} {<11>} {<65>} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CHOICE) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [783] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$CHOICE')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [(C {<Run_Backup>})] spids: [787 801] ) ] ) ] spids: [724 725 813 -1] ) (case_arm pat_list: [{<Restore>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:WHIP_TITLE) op: assign_op.Equal rhs: {(SQ <' Start restore? '>)} spids: [822] ) ] ) (C {<whiptail>} {<--title>} {(DQ ($ Id.VSub_DollarName '$WHIP_TITLE'))} {<--yesno>} { (DQ <'Your '> ($ Id.VSub_DollarName '$text_start_mode_desc') <' will be restored from:'> <Id.Lit_Other '\\'> <n> ($ Id.VSub_DollarName '$FP_TARGET_BACKUP') <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <'nDo you wish to continue?'> ) } {<--yes-button>} {(DQ <Ok>)} {<--no-button>} {(DQ <Back>)} {<--defaultno>} {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$WHIP_BACKTITLE'))} {<11>} {<65>} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CHOICE) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [876] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$CHOICE')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [(C {<Run_Restore>})] spids: [880 894] ) ] ) ] spids: [817 818 906 -1] ) ] ) ] spids: [491 505] ) ] else_action: [(C {<Menu_Exit>})] ) ] ) ) (command.ShFunction name: Menu_Exit body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:WHIP_TITLE) op: assign_op.Equal rhs: {(SQ <' Exit DietPi-Backup? '>)} spids: [937] ) ] ) (C {<whiptail>} {<--title>} {(DQ ($ Id.VSub_DollarName '$WHIP_TITLE'))} {<--yesno>} {(DQ ($ Id.VSub_DollarName '$WHIP_TITLE'))} {<--yes-button>} {(DQ <Ok>)} {<--no-button>} {(DQ <Back>)} {<--defaultno>} {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$WHIP_BACKTITLE'))} {<10>} {<50>} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CHOICE) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [982] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$CHOICE')}) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TARGETMENUID) op: assign_op.Equal rhs: {<-1>} spids: [1009] ) ] ) ] spids: [991 1005] ) ] ) ] ) ) (command.ShFunction name: Menu_Set_Directory body: (command.BraceGroup children: [ (C {<local>} {<Id.Lit_VarLike 'current_directory='> (DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP'))} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:WHIP_TITLE) op: assign_op.Equal rhs: {(SQ <'Select your backup and restore location'>)} spids: [1042] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:OPTION) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Simple words: [ {<whiptail>} {<--title>} {(DQ ($ Id.VSub_DollarName '$WHIP_TITLE'))} {<--menu>} { (DQ < 'Please select the location where your system backup will be saved, and restored from.' > <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <'nYour current location:'> <Id.Lit_Other '\\'> <n> ($ Id.VSub_DollarName '$FP_TARGET_BACKUP') ) } {<--cancel-button>} {(DQ <Back>)} {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$WHIP_BACKTITLE'))} {<15>} {<75>} {<3>} {(DQ <Search>)} {(DQ <'Find previous backups in /mnt/*'>)} {(DQ <List>)} {(DQ <'Select from a list of available mounts/drives'>)} {(DQ <Manual>)} {(DQ <'Manually type a directory to use.'>)} ] redirects: [ (redir.Redir op: <Id.Redir_GreatAnd '3>&'> fd: 3 arg_word: {<1>} ) (redir.Redir op: <Id.Redir_GreatAnd '1>&'> fd: 1 arg_word: {<2>} ) (redir.Redir op: <Id.Redir_GreatAnd '2>&'> fd: 2 arg_word: {<3>} ) ] ) ] ) ) } spids: [1048] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CHOICE) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [1130] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$CHOICE')}) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.Case to_match: {(DQ ($ Id.VSub_DollarName '$OPTION'))} arms: [ (case_arm pat_list: [{<Search>}] action: [ (C {<local>} {<Id.Lit_VarLike 'fp_search_results='> (DQ </tmp/.dietpi-backup_search_results>) } ) (C {<echo>} {<-e>} { (DQ <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <'nSearching /mnt/* for previous backups, please wait... '> <Id.Lit_Other '\\'> <'n '> <Id.Lit_Other '\\'> <n> ) } ) (command.Simple words: [ {<find>} {</mnt>} {<-type>} {<f>} {<-name>} {(DQ ($ Id.VSub_DollarName '$BACKUP_STATS_FILENAME_SYSTEM'))} ] redirects: [ (redir.Redir op: <Id.Redir_Great '>'> fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$fp_search_results'))} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_Great left: (arith_expr.ArithWord w: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<cat>} { (DQ ($ Id.VSub_DollarName '$fp_search_results' ) ) } ) (C {<wc>} {<-l>}) ] negated: F ) ] ) ) } ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.Simple words: [{<readarray>} {<search_results_list>}] redirects: [ (redir.Redir op: <Id.Redir_Less '<'> fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$fp_search_results'))} ) ] ) (C {<local>} {<Id.Lit_VarLike 'search_results_whiptail='> (sh_array_literal left: <Id.Op_LParen _> ) } ) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: (sh_lhs_expr.Name name:i) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) cond: (arith_expr.Binary op_id: Id.Arith_Less left: (arith_expr.VarRef token:<Id.Lit_ArithVarLike i>) right: (arith_expr.ArithWord w: { (braced_var_sub token: <Id.VSub_Name search_results_list> prefix_op: (Id.VSub_Pound) bracket_op: (bracket_op.WholeArray op_id: Id.Lit_At ) ) } ) ) update: (arith_expr.UnaryAssign op_id: Id.Node_PostDPlus child: (sh_lhs_expr.Name name:i) ) body: (command.DoGroup children: [ (C {<local>} {<Id.Lit_VarLike 'last_backup_date='> (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<grep>} {(SQ <Completed>)} { (braced_var_sub token: <Id.VSub_Name search_results_list > bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$i' ) } ) ) ) } ) (C {<tail>} {<-1>}) (C {<sed>} {(SQ <'s/.*: //'>)}) ] negated: F ) ] ) ) } ) (C {<local>} {<Id.Lit_VarLike 'backup_directory='> (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<echo>} {<-e>} { (braced_var_sub token: <Id.VSub_Name search_results_list > bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$i' ) } ) ) ) } ) (C {<sed>} {(SQ <'s/\\/'>) (DQ ($ Id.VSub_DollarName '$BACKUP_STATS_FILENAME_SYSTEM' ) ) (SQ <//g>) } ) ] negated: F ) ] ) ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name: search_results_whiptail ) op: assign_op.PlusEqual rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ { (DQ ($ Id.VSub_DollarName '$backup_directory' ) ) } { (DQ <': '> ($ Id.VSub_DollarName '$last_backup_date' ) ) } ] ) } spids: [1373] ) ] ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:OPTION) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Simple words: [ {<whiptail>} {<--title>} {(DQ <'Backups found.'>)} {<--menu>} { (DQ < 'Please select a previous backup to use:' > ) } {<--cancel-button>} {(DQ <Back>)} {<--backtitle>} { (DQ ($ Id.VSub_DollarName '$WHIP_BACKTITLE') ) } {<12>} {<70>} {<3>} { (DQ (braced_var_sub token: <Id.VSub_Name search_results_whiptail > bracket_op: (bracket_op.WholeArray op_id: Id.Lit_At ) ) ) } ] redirects: [ (redir.Redir op: <Id.Redir_GreatAnd '3>&'> fd: 3 arg_word: {<1>} ) (redir.Redir op: <Id.Redir_GreatAnd '1>&'> fd: 1 arg_word: {<2>} ) (redir.Redir op: <Id.Redir_GreatAnd '2>&'> fd: 2 arg_word: {<3>} ) ] ) ] ) ) } spids: [1391] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CHOICE) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [1445] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$CHOICE')} ) right: (arith_expr.ArithWord w: {<Id.Lit_Digits 0>} ) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FP_TARGET_BACKUP) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$OPTION'))} spids: [1467] ) ] ) ] spids: [1449 1463] ) ] ) (C {<unset>} {<search_results_list>}) (C {<unset>} {<search_results_whiptail>}) (command.Simple words: [{<rm>} {(DQ ($ Id.VSub_DollarName '$fp_search_results'))}] redirects: [ (redir.Redir op: <Id.Redir_AndGreat '&>'> fd: -1 arg_word: {</dev/null>} ) ] ) ] spids: [1218 1244] ) ] else_action: [ (C {<whiptail>} {<--title>} {(DQ <'No results'>)} {<--msgbox>} {(DQ <'No previous backups were found in /mnt/*'>)} {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$WHIP_BACKTITLE'))} {<10>} {<60>} ) ] ) ] spids: [1163 1164 1538 -1] ) (case_arm pat_list: [{<Manual>}] action: [(C {<Input_User_Directory>})] spids: [1542 1543 1551 -1] ) (case_arm pat_list: [{<List>}] action: [ (C {</DietPi/dietpi/dietpi-drive_manager>} {<1>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FP_TARGET_BACKUP) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {<cat>} {</tmp/dietpi-drive_manager_selmnt>}) ] ) ) ) } spids: [1565] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP'))} {<Id.Lit_Equals '='>} {(DQ </>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FP_TARGET_BACKUP) op: assign_op.Equal rhs: {(SQ </mnt>)} spids: [1596] ) ] ) ] spids: [1575 1592] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FP_TARGET_BACKUP) op: assign_op.PlusEqual rhs: {(SQ </dietpi-backup>)} spids: [1607] ) ] ) ] spids: [1555 1556 1614 -1] ) ] ) ] spids: [1135 1149] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TARGETMENUID) op: assign_op.Equal rhs: {<0>} spids: [1630] ) ] ) ] ) (C {<Check_Supported_Directory_Location>}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$TARGET_DIRECTORY_SUPPORTED')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FP_TARGET_BACKUP) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$current_directory'))} spids: [1664] ) ] ) ] spids: [1646 1660] ) ] ) ] ) ) (command.ShFunction name: Input_User_Directory body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:OPTION) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Simple words: [ {<whiptail>} {<--inputbox>} { (DQ <'Please enter the filepath to your directory. '> <Id.Lit_Other '\\'> <'neg: /mnt/dietpi-backup'> <Id.Lit_Other '\\'> <'n - Must be located inside /mnt/* '> <Id.Lit_Other '\\'> <'n - Must be symlink compatible filesystem (ext2/3/4)'> ) } {<10>} {<70>} {(DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP'))} {<--title>} {(DQ <'Manual backup directory'>)} {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$WHIP_BACKTITLE'))} ] redirects: [ (redir.Redir op: <Id.Redir_GreatAnd '3>&'> fd: 3 arg_word: {<1>} ) (redir.Redir op: <Id.Redir_GreatAnd '1>&'> fd: 1 arg_word: {<2>} ) (redir.Redir op: <Id.Redir_GreatAnd '2>&'> fd: 2 arg_word: {<3>} ) ] ) ] ) ) } spids: [1686] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CHOICE) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [1733] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$CHOICE')}) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FP_TARGET_BACKUP) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$OPTION'))} spids: [1755] ) ] ) ] spids: [1737 1751] ) ] ) ] ) ) (command.ShFunction name: Error_Filesystem_Not_Supported body: (command.BraceGroup children: [ (C {<G_DIETPI-NOTIFY>} {<1>} {(DQ <'Filesystem not supported in '> ($ Id.VSub_DollarName '$FP_TARGET_BACKUP'))} ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$G_USER_INPUTS')}) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<whiptail>} {<--title>} {(DQ <Error>)} {<--msgbox>} { (DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP') <' Has a filesystem of: '> ($ Id.VSub_DollarName '$TARGET_FILESYSTEM_TYPE') <', and is not supported.'> <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <'nThe filesystem must be EXT2/3/4 for symlink compatibility.'> ) } {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$WHIP_BACKTITLE'))} {<11>} {<70>} ) ] spids: [1800 1810] ) ] ) ] ) ) (command.ShFunction name: Error_Not_Mnt_Directory body: (command.BraceGroup children: [ (C {<G_DIETPI-NOTIFY>} {<1>} { (DQ <'Target directory is not inside /mnt ('> ($ Id.VSub_DollarName '$FP_TARGET_BACKUP') <')'> ) } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$G_USER_INPUTS')}) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<whiptail>} {<--title>} {(DQ <'Directory not supported'>)} {<--msgbox>} { (DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP') <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <'nYour current location is not supported.'> <Id.Lit_Other '\\'> <'nThe location must be inside the /mnt/* directory.'> <Id.Lit_Other '\\'> <'n - eg: /mnt/dietpi-backup'> ) } {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$WHIP_BACKTITLE'))} {<11>} {<70>} ) ] spids: [1874 1884] ) ] ) ] ) ) (command.ShFunction name: Error_DietpiUserdata_Directory body: (command.BraceGroup children: [ (C {<G_DIETPI-NOTIFY>} {<1>} { (DQ <'Target directory can not be contained within DietPi user data location ('> ($ Id.VSub_DollarName '$FP_TARGET_BACKUP') <')'> ) } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$G_USER_INPUTS')}) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<whiptail>} {<--title>} {(DQ <'Directory not supported'>)} {<--msgbox>} { (DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP') <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <'nYour current location is not supported.'> <Id.Lit_Other '\\'> < 'nTarget directory can not be contained within DietPi user data location (' > ($ Id.VSub_DollarName '$G_FP_DIETPI_USERDATA') <')'> ) } {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$WHIP_BACKTITLE'))} {<13>} {<70>} ) ] spids: [1949 1959] ) ] ) ] ) ) (command.ShFunction name: Error_Rsync_Already_Running body: (command.BraceGroup children: [ (C {<G_DIETPI-NOTIFY>} {<1>} {(DQ <'Another Rsync process is already running.'>)}) (command.Simple words: [ {<echo>} {<-e>} { (DQ ($ Id.VSub_DollarName '$RSYNC_MODE_TEXT') <' failed: '> (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [(C {<date>} {<Id.Lit_Other '+'> (DQ <'%d-%m-%Y_%H%M'>)})] ) ) <'. Rsync is already running.'> ) } ] redirects: [ (redir.Redir op: <Id.Redir_DGreat '>>'> fd: -1 arg_word: { (DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP') </> ($ Id.VSub_DollarName '$BACKUP_STATS_FILENAME_SYSTEM') ) } ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$G_USER_INPUTS')}) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<whiptail>} {<--title>} {(DQ ($ Id.VSub_DollarName '$RSYNC_MODE_TEXT') <' Error'>)} {<--msgbox>} { (DQ <'A '> ($ Id.VSub_DollarName '$RSYNC_MODE_TEXT') <' could not be started as rsync is already running.'> ) } {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$WHIP_BACKTITLE'))} {<13>} {<60>} ) ] spids: [2054 2064] ) ] ) ] ) ) (command.ShFunction name: Error_Rsync_Failed body: (command.BraceGroup children: [ (C {<G_DIETPI-NOTIFY>} {<1>} {(DQ ($ Id.VSub_DollarName '$RSYNC_MODE_TEXT') <' failed.'>)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$G_USER_INPUTS')}) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<whiptail>} {<--title>} {(DQ ($ Id.VSub_DollarName '$RSYNC_MODE_TEXT') <' failed'>)} {<--msgbox>} { (DQ <'Your '> ($ Id.VSub_DollarName '$RSYNC_MODE_TEXT') <' has failed. Please see the Log file for more information:'> <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <n> ($ Id.VSub_DollarName '$LOGFILE') ) } {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$WHIP_BACKTITLE'))} {<12>} {<60>} ) ] spids: [2127 2137] ) ] ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RSYNC_MODE_TEXT) op: assign_op.Equal rhs: {<0>} spids: [2195] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BACKUP_MODE) op: assign_op.Equal rhs: {<1>} spids: [2199] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LOGFILE) op: assign_op.Equal rhs: {(SQ </var/log/dietpi-backup.log>)} spids: [2211] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FP_SOURCE_SYSTEM) op: assign_op.Equal rhs: {(SQ </>)} spids: [2222] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FP_TARGET_BACKUP) op: assign_op.Equal rhs: {(SQ </mnt/dietpi-backup>)} spids: [2228] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:G_FP_DIETPI_USERDATA_ACTUAL) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [(C {<readlink>} {<-f>} {</mnt/dietpi_userdata>})] ) ) ) } spids: [2234] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BACKUP_STATS_FILENAME_SYSTEM) op: assign_op.Equal rhs: {(SQ <.dietpi-backup_system_stats>)} spids: [2251] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BACKUP_STATS_FILENAME_USERDATA) op: assign_op.Equal rhs: {(SQ <.dietpi-backup_userdata_stats>)} spids: [2257] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FP_FILTER_INCLUDE_EXCLUDE_SYSTEM_BACKUP) op: assign_op.Equal rhs: {(SQ </tmp/.dietpi-backup_filter_inc_exc>)} spids: [2268] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FP_EXCLUDE_USER) op: assign_op.Equal rhs: {(SQ </DietPi/dietpi/.dietpi-backup_exclude>)} spids: [2274] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FP_INCLUDE_USER) op: assign_op.Equal rhs: {(SQ </DietPi/dietpi/.dietpi-backup_include>)} spids: [2280] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TARGET_FILESYSTEM_TYPE) op: assign_op.Equal rhs: {<0>} spids: [2291] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TARGET_DIRECTORY_SUPPORTED) op: assign_op.Equal rhs: {<0>} spids: [2295] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:aSUPPORTED_FILESYSTEMS) op: assign_op.Equal rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [{(SQ <ext4>)} {(SQ <ext3>)} {(SQ <ext2>)} {(SQ <nfs>)} {(SQ <nfs4>)} {(SQ <btrfs>)}] ) } spids: [2299] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RSYNC_RUN_OPTIONS_SYSTEM_BACKUP) op: assign_op.Equal rhs: { (DQ <'-alHpvP --delete --log-file='> ($ Id.VSub_DollarName '$LOGFILE') <' --include-from='> ($ Id.VSub_DollarName '$FP_FILTER_INCLUDE_EXCLUDE_SYSTEM_BACKUP') ) } spids: [2341] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RSYNC_RUN_OPTIONS_USERDATA_BACKUP) op: assign_op.Equal rhs: {(DQ <'-alHpvP --delete --log-file='> ($ Id.VSub_DollarName '$LOGFILE'))} spids: [2350] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BACKUP_RESTORE_FAILED) op: assign_op.Equal rhs: {<0>} spids: [2362] ) ] ) (command.ShFunction name: Print_Date body: (command.BraceGroup children: [ (C {<echo>} {<-e>} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [(C {<date>} {<Id.Lit_Other '+'> (DQ <'%d-%m-%Y %H:%M'>)})] ) ) ) } ) ] ) ) (command.ShFunction name: Create_Filter_Include_Exclude body: (command.BraceGroup children: [ (command.Simple words: [{<cat>}] redirects: [ (redir.HereDoc op: <Id.Redir_DLess '<<'> fd: -1 here_begin: {<_EOF_>} here_end_span_id: 2426 stdin_parts: [<'#INCLUDE\n'> <'#Global - Folders\n'> <'#+ /example/\n'>] ) (redir.Redir op: <Id.Redir_Great '>'> fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$FP_FILTER_INCLUDE_EXCLUDE_SYSTEM_BACKUP'))} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-f>} {(DQ ($ Id.VSub_DollarName '$FP_INCLUDE_USER'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.Simple words: [{<echo>} {<-e>} {(DQ <Id.Lit_Other '\\'> <'n#User include file'>)}] redirects: [ (redir.Redir op: <Id.Redir_DGreat '>>'> fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$FP_FILTER_INCLUDE_EXCLUDE_SYSTEM_BACKUP'))} ) ] ) (command.WhileUntil keyword: <Id.KW_While while> cond: [(C {<read>} {<-r>} {<line>})] body: (command.DoGroup children: [ (command.Simple words: [{<echo>} {<-e>} {(DQ <'+ '> ($ Id.VSub_DollarName '$line'))}] redirects: [ (redir.Redir op: <Id.Redir_DGreat '>>'> fd: -1 arg_word: { (DQ ($ Id.VSub_DollarName '$FP_FILTER_INCLUDE_EXCLUDE_SYSTEM_BACKUP' ) ) } ) ] ) ] ) redirects: [ (redir.Redir op: <Id.Redir_Less '<'> fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$FP_INCLUDE_USER'))} ) ] ) ] spids: [2433 2446] ) ] ) (command.Simple words: [{<cat>}] redirects: [ (redir.HereDoc op: <Id.Redir_DLess '<<'> fd: -1 here_begin: {<_EOF_>} here_end_span_id: 2569 stdin_parts: [ <'\n'> <'#EXCLUDE\n'> <'#Global - Folders\n'> <'- '> ($ Id.VSub_DollarName '$FP_TARGET_BACKUP') <'/\n'> <'- /mnt/\n'> <'- /media/\n'> <'- /dev/\n'> <'- /proc/\n'> <'- /sys/\n'> <'- /tmp/\n'> <'- /run/\n'> <'\n'> <'#Apt package cache (.deb)\n'> <'- /var/cache/apt/archives/\n'> <'\n'> <'#Manpages / Docs\n'> <'- /usr/share/man/\n'> <'- /usr/share/doc/\n'> <'\n'> <'#Global - Files\n'> <'- '> ($ Id.VSub_DollarName '$LOGFILE') <'\n'> <'- '> ($ Id.VSub_DollarName '$FP_DIETPIBACKUP_SETTINGS') <'\n'> <'- '> ($ Id.VSub_DollarName '$BACKUP_STATS_FILENAME_SYSTEM') <'\n'> <'- '> ($ Id.VSub_DollarName '$BACKUP_STATS_FILENAME_USERDATA') <'\n'> <'- /var/swap\n'> <'- fake-hwclock.data\n'> <'- *.tmp\n'> <'\n'> <'#MS Windows specific\n'> <'- Thumbs.db\n'> <'- desktop.ini\n'> ] ) (redir.Redir op: <Id.Redir_DGreat '>>'> fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$FP_FILTER_INCLUDE_EXCLUDE_SYSTEM_BACKUP'))} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-f>} {(DQ ($ Id.VSub_DollarName '$FP_EXCLUDE_USER'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.Simple words: [{<echo>} {<-e>} {(DQ <Id.Lit_Other '\\'> <'n#User exclude file'>)}] redirects: [ (redir.Redir op: <Id.Redir_DGreat '>>'> fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$FP_FILTER_INCLUDE_EXCLUDE_SYSTEM_BACKUP'))} ) ] ) (command.WhileUntil keyword: <Id.KW_While while> cond: [(C {<read>} {<-r>} {<line>})] body: (command.DoGroup children: [ (command.Simple words: [{<echo>} {<-e>} {(DQ <'- '> ($ Id.VSub_DollarName '$line'))}] redirects: [ (redir.Redir op: <Id.Redir_DGreat '>>'> fd: -1 arg_word: { (DQ ($ Id.VSub_DollarName '$FP_FILTER_INCLUDE_EXCLUDE_SYSTEM_BACKUP' ) ) } ) ] ) ] ) redirects: [ (redir.Redir op: <Id.Redir_Less '<'> fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$FP_EXCLUDE_USER'))} ) ] ) ] spids: [2576 2589] ) ] ) (C {<cp>} {(DQ ($ Id.VSub_DollarName '$FP_FILTER_INCLUDE_EXCLUDE_SYSTEM_BACKUP'))} {</tmp/.dietpi-backup_inc_exc_list>} ) ] ) ) (command.ShFunction name: Services_Stop body: (command.BraceGroup children:[(C {</DietPi/dietpi/dietpi-services>} {<stop>})]) ) (command.ShFunction name: Services_Start body: (command.BraceGroup children:[(C {</DietPi/dietpi/dietpi-services>} {<start>})]) ) (command.ShFunction name: Run_Backup body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RSYNC_MODE_TEXT) op: assign_op.Equal rhs: {(DQ <Backup>)} spids: [2708] ) ] ) (C {<G_DIETPI-NOTIFY>} {<3>} {<DietPi-Backup>} {(DQ ($ Id.VSub_DollarName '$RSYNC_MODE_TEXT'))} ) (C {<Check_Supported_Directory_Location>}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$TARGET_DIRECTORY_SUPPORTED')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<mkdir>} {<-p>} {(DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP'))}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-d>} {(DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$G_USER_INPUTS')} ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<whiptail>} {<--title>} {(DQ ($ Id.VSub_DollarName '$RSYNC_MODE_TEXT') <' failed.'>)} {<--msgbox>} {(DQ <'Unable to create '> ($ Id.VSub_DollarName '$FP_TARGET_BACKUP'))} {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$WHIP_BACKTITLE'))} {<10>} {<60>} ) ] spids: [2794 2804] ) ] ) ] spids: [2775 2790] ) (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<ps>} {<aux>}) (C {<grep>} {<-ci>} {<-m1>} {(DQ <'[r]sync'>)}) ] negated: F ) ] ) ) } ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [(C {<Error_Rsync_Already_Running>})] spids: [2844 2874] ) ] else_action: [ (command.Simple words: [ {<echo>} {<-e>} { (DQ <'DietPi-Backup Log File. '> (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {<date>} {<Id.Lit_Other '+'> (DQ <'%d-%m-%Y_%H%M'>)}) ] ) ) <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <n> ) } ] redirects: [ (redir.Redir op: <Id.Redir_Great '>'> fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$LOGFILE'))} ) ] ) (C {<Create_Filter_Include_Exclude>}) (C {<Services_Stop>}) (C {<G_DIETPI-NOTIFY>} {<2>} {(DQ <'Backing up to: '> ($ Id.VSub_DollarName '$FP_TARGET_BACKUP'))} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BACKUP_RESTORE_FAILED) op: assign_op.Equal rhs: {<0>} spids: [2942] ) ] ) (command.WhileUntil keyword: <Id.KW_While while> cond: [(C {<true>})] body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RSYNC_MODE_TEXT) op: assign_op.Equal rhs: {(SQ <'Backup (system)'>)} spids: [2960] ) ] ) (C {<rsync>} {($ Id.VSub_DollarName '$RSYNC_RUN_OPTIONS_SYSTEM_BACKUP')} {(DQ ($ Id.VSub_DollarName '$FP_SOURCE_SYSTEM'))} {(DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP')) </dietpi-backup_system/> } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_QMark '$?')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<G_DIETPI-NOTIFY>} {<0>} { (DQ ($ Id.VSub_DollarName '$RSYNC_MODE_TEXT') <' Completed.'> <Id.Lit_Other '\\'> <n> ) } ) (command.Simple words: [ {<echo>} {<-e>} { (DQ ($ Id.VSub_DollarName '$RSYNC_MODE_TEXT') <' Completed : '> (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [(C {<Print_Date>})] ) ) ) } ] redirects: [ (redir.Redir op: <Id.Redir_DGreat '>>'> fd: -1 arg_word: { (DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP') </> ($ Id.VSub_DollarName '$BACKUP_STATS_FILENAME_SYSTEM' ) ) } ) ] ) ] spids: [2981 2995] ) ] else_action: [ (C {<G_DIETPI-NOTIFY>} {<1>} { (DQ ($ Id.VSub_DollarName '$RSYNC_MODE_TEXT') <' FAILED.'> <Id.Lit_Other '\\'> <n> ) } ) (command.Simple words: [ {<echo>} {<-e>} { (DQ ($ Id.VSub_DollarName '$RSYNC_MODE_TEXT') <' FAILED : '> (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [(C {<Print_Date>})] ) ) ) } ] redirects: [ (redir.Redir op: <Id.Redir_DGreat '>>'> fd: -1 arg_word: { (DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP') </> ($ Id.VSub_DollarName '$BACKUP_STATS_FILENAME_SYSTEM') ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BACKUP_RESTORE_FAILED) op: assign_op.Equal rhs: {<1>} spids: [3071] ) ] ) (command.ControlFlow token: <Id.ControlFlow_Break break> ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RSYNC_MODE_TEXT) op: assign_op.Equal rhs: {(SQ <'Backup (user data)'>)} spids: [3087] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$BACKUP_MODE')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<rsync>} { ($ Id.VSub_DollarName '$RSYNC_RUN_OPTIONS_USERDATA_BACKUP' ) } {(DQ ($ Id.VSub_DollarName '$G_FP_DIETPI_USERDATA_ACTUAL')) </>} {(DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP')) </dietpi-backup_userdata/> } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_QMark '$?')} ) right: (arith_expr.ArithWord w: {<Id.Lit_Digits 0>} ) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<G_DIETPI-NOTIFY>} {<0>} { (DQ ($ Id.VSub_DollarName '$RSYNC_MODE_TEXT') <' Completed.'> <Id.Lit_Other '\\'> <n> ) } ) (command.Simple words: [ {<echo>} {<-e>} { (DQ ($ Id.VSub_DollarName '$RSYNC_MODE_TEXT') <' Completed : '> (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [(C {<Print_Date>})] ) ) ) } ] redirects: [ (redir.Redir op: <Id.Redir_DGreat '>>'> fd: -1 arg_word: { (DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP') </> ($ Id.VSub_DollarName '$BACKUP_STATS_FILENAME_USERDATA') ) } ) ] ) ] spids: [3127 3141] ) ] else_action: [ (C {<G_DIETPI-NOTIFY>} {<1>} { (DQ ($ Id.VSub_DollarName '$RSYNC_MODE_TEXT') <' FAILED.'> <Id.Lit_Other '\\'> <n> ) } ) (command.Simple words: [ {<echo>} {<-e>} { (DQ ($ Id.VSub_DollarName '$RSYNC_MODE_TEXT') <' FAILED : '> (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [(C {<Print_Date>})] ) ) ) } ] redirects: [ (redir.Redir op: <Id.Redir_DGreat '>>'> fd: -1 arg_word: { (DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP') </> ($ Id.VSub_DollarName '$BACKUP_STATS_FILENAME_USERDATA') ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BACKUP_RESTORE_FAILED) op: assign_op.Equal rhs: {<1>} spids: [3217] ) ] ) (command.ControlFlow token: <Id.ControlFlow_Break break> ) ] ) ] spids: [3094 3108] ) ] ) (command.ControlFlow token: <Id.ControlFlow_Break break> ) ] ) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$BACKUP_RESTORE_FAILED')} ) ) terminator: <Id.Op_Semi _> ) ] action: [(C {<Error_Rsync_Failed>})] spids: [3245 3255] ) ] else_action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$G_USER_INPUTS')} ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RSYNC_MODE_TEXT) op: assign_op.Equal rhs: {(SQ <Backup>)} spids: [3281] ) ] ) (C {<whiptail>} {<--title>} {(DQ ($ Id.VSub_DollarName '$RSYNC_MODE_TEXT') <' completed'>)} {<--msgbox>} { (DQ <'Your '> ($ Id.VSub_DollarName '$RSYNC_MODE_TEXT') <' was saved to:'> <Id.Lit_Other '\\'> <n> ($ Id.VSub_DollarName '$FP_TARGET_BACKUP') <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <'nLog file: '> ($ Id.VSub_DollarName '$LOGFILE') ) } {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$WHIP_BACKTITLE'))} {<11>} {<60>} ) ] spids: [3267 3277] ) ] ) ] ) (C {<Services_Start>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TARGETMENUID) op: assign_op.Equal rhs: {<0>} spids: [3340] ) ] ) ] ) ] spids: [2739 2753] ) ] ) ] ) ) (command.ShFunction name: Run_Restore body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RSYNC_MODE_TEXT) op: assign_op.Equal rhs: {(DQ <Restore>)} spids: [3363] ) ] ) (C {<G_DIETPI-NOTIFY>} {<3>} {<DietPi-Backup>} {(DQ ($ Id.VSub_DollarName '$RSYNC_MODE_TEXT'))} ) (C {<Check_Supported_Directory_Location>}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$TARGET_DIRECTORY_SUPPORTED')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-f>} { (DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP') </> ($ Id.VSub_DollarName '$BACKUP_STATS_FILENAME_SYSTEM') ) } {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ <'No Backup was found in '> ($ Id.VSub_DollarName '$FP_TARGET_BACKUP') ) } ) (C {<G_DIETPI-NOTIFY>} {<1>} { (DQ ($ Id.VSub_DollarName '$RSYNC_MODE_TEXT') <' Failed.'> <Id.Lit_Other '\\'> <n> ) } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$G_USER_INPUTS')} ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<whiptail>} {<--title>} {(DQ ($ Id.VSub_DollarName '$RSYNC_MODE_TEXT') <' failed'>)} {<--msgbox>} { (DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP') </> ($ Id.VSub_DollarName '$BACKUP_STATS_FILENAME_SYSTEM') <' does not exist'> <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <'nHave you created a backup?'> ) } {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$WHIP_BACKTITLE'))} {<11>} {<70>} ) ] spids: [3459 3469] ) ] ) ] spids: [3416 3433] ) (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<ps>} {<aux>}) (C {<grep>} {<-ci>} {<-m1>} {(DQ <'[r]sync'>)}) ] negated: F ) ] ) ) } ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [(C {<Error_Rsync_Already_Running>})] spids: [3515 3545] ) ] else_action: [ (C {<Create_Filter_Include_Exclude>}) (C {<Services_Stop>}) (C {<G_DIETPI-NOTIFY>} {<2>} {(DQ <'Restoring from: '> ($ Id.VSub_DollarName '$FP_TARGET_BACKUP'))} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BACKUP_RESTORE_FAILED) op: assign_op.Equal rhs: {<0>} spids: [3584] ) ] ) (command.WhileUntil keyword: <Id.KW_While while> cond: [(C {<true>})] body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RSYNC_MODE_TEXT) op: assign_op.Equal rhs: {(SQ <'Restore (system)'>)} spids: [3602] ) ] ) (C {<rsync>} {($ Id.VSub_DollarName '$RSYNC_RUN_OPTIONS_SYSTEM_BACKUP')} {(DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP')) </dietpi-backup_system/>} {(DQ ($ Id.VSub_DollarName '$FP_SOURCE_SYSTEM'))} ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_QMark '$?')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<G_DIETPI-NOTIFY>} {<0>} { (DQ ($ Id.VSub_DollarName '$RSYNC_MODE_TEXT') <' Completed.'> <Id.Lit_Other '\\'> <n> ) } ) (command.Simple words: [ {<echo>} {<-e>} { (DQ ($ Id.VSub_DollarName '$RSYNC_MODE_TEXT') <' Completed : '> (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [(C {<Print_Date>})] ) ) ) } ] redirects: [ (redir.Redir op: <Id.Redir_DGreat '>>'> fd: -1 arg_word: { (DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP') </> ($ Id.VSub_DollarName '$BACKUP_STATS_FILENAME_SYSTEM' ) ) } ) ] ) ] spids: [3623 3637] ) ] else_action: [ (C {<G_DIETPI-NOTIFY>} {<1>} { (DQ ($ Id.VSub_DollarName '$RSYNC_MODE_TEXT') <' FAILED.'> <Id.Lit_Other '\\'> <n> ) } ) (command.Simple words: [ {<echo>} {<-e>} { (DQ ($ Id.VSub_DollarName '$RSYNC_MODE_TEXT') <' FAILED : '> (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [(C {<Print_Date>})] ) ) ) } ] redirects: [ (redir.Redir op: <Id.Redir_DGreat '>>'> fd: -1 arg_word: { (DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP') </> ($ Id.VSub_DollarName '$BACKUP_STATS_FILENAME_SYSTEM') ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BACKUP_RESTORE_FAILED) op: assign_op.Equal rhs: {<1>} spids: [3712] ) ] ) (command.ControlFlow token: <Id.ControlFlow_Break break> ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RSYNC_MODE_TEXT) op: assign_op.Equal rhs: {(SQ <'Restore (user data)'>)} spids: [3728] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$BACKUP_MODE')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-f>} { (DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP') </> ($ Id.VSub_DollarName '$BACKUP_STATS_FILENAME_USERDATA') ) } {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<rsync>} { ($ Id.VSub_DollarName '$RSYNC_RUN_OPTIONS_USERDATA_BACKUP' ) } {(DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP')) </dietpi-backup_userdata/>} { (DQ ($ Id.VSub_DollarName '$G_FP_DIETPI_USERDATA_ACTUAL' ) ) </> } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_QMark '$?')} ) right: (arith_expr.ArithWord w: {<Id.Lit_Digits 0>} ) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<G_DIETPI-NOTIFY>} {<0>} { (DQ ($ Id.VSub_DollarName '$RSYNC_MODE_TEXT' ) <' Completed.'> <Id.Lit_Other '\\'> <n> ) } ) (command.Simple words: [ {<echo>} {<-e>} { (DQ ($ Id.VSub_DollarName '$RSYNC_MODE_TEXT' ) <' Completed : '> (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [(C {<Print_Date>})] ) ) ) } ] redirects: [ (redir.Redir op: <Id.Redir_DGreat '>>'> fd: -1 arg_word: { (DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP' ) </> ($ Id.VSub_DollarName '$BACKUP_STATS_FILENAME_USERDATA') ) } ) ] ) ] spids: [3791 3805] ) ] else_action: [ (C {<G_DIETPI-NOTIFY>} {<1>} { (DQ ($ Id.VSub_DollarName '$RSYNC_MODE_TEXT') <' FAILED.'> <Id.Lit_Other '\\'> <n> ) } ) (command.Simple words: [ {<echo>} {<-e>} { (DQ ($ Id.VSub_DollarName '$RSYNC_MODE_TEXT') <' FAILED : '> (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [(C {<Print_Date>})] ) ) ) } ] redirects: [ (redir.Redir op: <Id.Redir_DGreat '>>'> fd: -1 arg_word: { (DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP' ) </> ($ Id.VSub_DollarName '$BACKUP_STATS_FILENAME_USERDATA') ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name: BACKUP_RESTORE_FAILED ) op: assign_op.Equal rhs: {<1>} spids: [3880] ) ] ) (command.ControlFlow token: <Id.ControlFlow_Break break> ) ] ) ] spids: [3757 3772] ) ] else_action: [ (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ ($ Id.VSub_DollarName '$RSYNC_MODE_TEXT') <': No backup exists, skipping...'> <Id.Lit_Other '\\'> <n> ) } ) ] ) ] spids: [3735 3749] ) ] ) (command.ControlFlow token: <Id.ControlFlow_Break break> ) ] ) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$BACKUP_RESTORE_FAILED')} ) ) terminator: <Id.Op_Semi _> ) ] action: [(C {<Error_Rsync_Failed>})] spids: [3929 3939] ) ] else_action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$G_USER_INPUTS')} ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RSYNC_MODE_TEXT) op: assign_op.Equal rhs: {(SQ <Restore>)} spids: [3965] ) ] ) (C {<whiptail>} {<--title>} {(DQ ($ Id.VSub_DollarName '$RSYNC_MODE_TEXT') <' completed'>)} {<--msgbox>} { (DQ ($ Id.VSub_DollarName '$RSYNC_MODE_TEXT') <' completed from:'> <Id.Lit_Other '\\'> <n> ($ Id.VSub_DollarName '$FP_TARGET_BACKUP') <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <'nLog file: '> ($ Id.VSub_DollarName '$LOGFILE') <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <'nA Reboot is required.'> ) } {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$WHIP_BACKTITLE'))} {<13>} {<60>} ) ] spids: [3951 3961] ) ] ) ] ) (C {<Services_Start>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TARGETMENUID) op: assign_op.Equal rhs: {<0>} spids: [4027] ) ] ) ] ) ] spids: [3394 3408] ) ] ) ] ) ) (command.ShFunction name: Check_Install_PreReqs body: (command.BraceGroup children:[(C {<G_AG_CHECK_INSTALL_PREREQ>} {<rsync>})]) ) (command.ShFunction name: Check_Supported_Directory_Location body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TARGET_DIRECTORY_SUPPORTED) op: assign_op.Equal rhs: {<0>} spids: [4068] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DPipe] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP'))} right: {(DQ ($ Id.VSub_DollarName '$G_FP_DIETPI_USERDATA')) <Id.Lit_Other '*'> } ) ) (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP'))} right: {(DQ ($ Id.VSub_DollarName '$G_FP_DIETPI_USERDATA_ACTUAL')) <Id.Lit_Other '*'> } ) ) ] ) terminator: <Id.Op_Semi _> ) ] action: [(C {<Error_DietpiUserdata_Directory>})] spids: [4077 4113] ) (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP'))} right: {(DQ </mnt/>) <Id.Lit_Other '*'>} ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<local>} {<Id.Lit_VarLike 'directory_generated='> <0>}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-d>} {(DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<mkdir>} {<-p>} {(DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP'))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:directory_generated) op: assign_op.Equal rhs: {<1>} spids: [4185] ) ] ) ] spids: [4157 4172] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TARGET_FILESYSTEM_TYPE) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<df>} {<-T>} {($ Id.VSub_DollarName '$FP_TARGET_BACKUP')} ) (C {<sed>} {<-n>} {(SQ <2p>)}) (C {<awk>} {(SQ <'{print $2}'>)}) ] negated: F ) ] ) ) ) } spids: [4194] ) ] ) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: (sh_lhs_expr.Name name:i) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) cond: (arith_expr.Binary op_id: Id.Arith_Less left: (arith_expr.VarRef token:<Id.Lit_ArithVarLike i>) right: (arith_expr.ArithWord w: { (braced_var_sub token: <Id.VSub_Name aSUPPORTED_FILESYSTEMS> prefix_op: (Id.VSub_Pound) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) } ) ) update: (arith_expr.UnaryAssign op_id: Id.Node_PostDPlus child: (sh_lhs_expr.Name name:i) ) body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$TARGET_FILESYSTEM_TYPE'))} {<Id.Lit_Equals '='>} { (DQ (braced_var_sub token: <Id.VSub_Name aSUPPORTED_FILESYSTEMS> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) ) } {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TARGET_DIRECTORY_SUPPORTED) op: assign_op.Equal rhs: {<1>} spids: [4280] ) ] ) (command.ControlFlow token: <Id.ControlFlow_Break break> ) ] spids: [4254 4276] ) ] ) ] ) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$directory_generated')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [(C {<rm>} {<-R>} {(DQ ($ Id.VSub_DollarName '$FP_TARGET_BACKUP'))})] spids: [4300 4314] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$TARGET_DIRECTORY_SUPPORTED')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [(C {<Error_Filesystem_Not_Supported>})] spids: [4336 4350] ) ] ) ] spids: [4125 4143] ) ] else_action: [(C {<Error_Not_Mnt_Directory>})] ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FP_DIETPIBACKUP_SETTINGS) op: assign_op.Equal rhs: {(DQ </DietPi/dietpi/.dietpi-backup_settings>)} spids: [4398] ) ] ) (command.ShFunction name: Write_Settings_File body: (command.BraceGroup children: [ (command.Simple words: [{<cat>}] redirects: [ (redir.HereDoc op: <Id.Redir_DLess '<<'> fd: -1 here_begin: {<_EOF_>} here_end_span_id: 4431 stdin_parts: [ <'FP_TARGET_BACKUP='> ($ Id.VSub_DollarName '$FP_TARGET_BACKUP') <'\n'> <'BACKUP_MODE='> ($ Id.VSub_DollarName '$BACKUP_MODE') <'\n'> ] ) (redir.Redir op: <Id.Redir_Great '>'> fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$FP_DIETPIBACKUP_SETTINGS'))} ) ] ) ] ) ) (command.ShFunction name: Read_Settings_File body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-f>} {(DQ ($ Id.VSub_DollarName '$FP_DIETPIBACKUP_SETTINGS'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [(C {<.>} {(DQ ($ Id.VSub_DollarName '$FP_DIETPIBACKUP_SETTINGS'))})] spids: [4445 4458] ) ] ) ] ) ) (C {<Check_Install_PreReqs>}) (C {<Read_Settings_File>}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_Number '$2'))} {<Id.Lit_RBracket ']'>}) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FP_TARGET_BACKUP) op: assign_op.Equal rhs: {($ Id.VSub_Number '$2')} spids: [4528] ) ] ) ] spids: [4511 4524] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$INPUT')}) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [(C {<Run_Backup>})] spids: [4545 4559] ) (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$INPUT')}) right: (arith_expr.Unary op_id: Id.Node_UnaryMinus child: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>}) ) ) ) terminator: <Id.Op_Semi _> ) ] action: [(C {<Run_Restore>})] spids: [4571 4586] ) (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$INPUT')}) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.WhileUntil keyword: <Id.KW_While while> cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_Great left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$TARGETMENUID')}) right: (arith_expr.Unary op_id: Id.Node_UnaryMinus child: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>}) ) ) ) terminator: <Id.Op_Semi _> ) ] body: (command.DoGroup children: [ (C {<clear>}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$TARGETMENUID')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [(C {<Menu_Main>})] spids: [4643 4657] ) (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$TARGETMENUID')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [(C {<Menu_Set_Directory>})] spids: [4665 4679] ) ] ) ] ) ) (C {<Write_Settings_File>}) ] spids: [4602 4616] ) ] ) (command.Simple words: [{<rm>} {(DQ ($ Id.VSub_DollarName '$FP_FILTER_INCLUDE_EXCLUDE_SYSTEM_BACKUP'))}] redirects: [(redir.Redir op:<Id.Redir_AndGreat '&>'> fd:-1 arg_word:{</dev/null>})] ) (C {<unset>} {<aSUPPORTED_FILESYSTEMS>}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>}) ] )