File tree 3 files changed +16
-2
lines changed
3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 1
1
* .pyc
2
+ backup. *
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ BACKUP_BASE=./backupscripts
4
+ BACKUP_CONF=$BACKUP_BASE /backup.conf
5
+ BACKUP_DIR=$BACKUP_BASE /backup-base
6
+ BACKUP_CMD=$BACKUP_BASE /incrbackup.py
7
+ BACKUP_SERVER=backup01
8
+ BACKUP_USER=root
9
+ BACKUP_NS=backup-name
10
+ BACKUP_KEEP=90
11
+
12
+ $BACKUP_CMD --server $BACKUP_SERVER -f $BACKUP_CONF -t $BACKUP_DIR -u $BACKUP_USER -n $BACKUP_NS -k $BACKUP_KEEP
Original file line number Diff line number Diff line change @@ -191,7 +191,8 @@ def main(argv):
191
191
# create the backup object and call its backup method
192
192
rotback = RotateBackups (keep , store )
193
193
rotated_names = rotback .rotate_backups ()
194
- print ("\n " .join (rotated_names ))
194
+ if (len (rotated_names ) > 0 ):
195
+ print ("\n " .join (rotated_names )
195
196
196
197
except (Exception ):
197
198
logging .exception ("Rotate backups failed." )
@@ -200,4 +201,4 @@ def main(argv):
200
201
201
202
# if we are running the script from the command line, run the main function
202
203
if __name__ == "__main__" :
203
- main (sys .argv [1 :])
204
+ main (sys .argv [1 :])
You can’t perform that action at this time.
0 commit comments