File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -66,23 +66,23 @@ if [ -f ./backups/dropbox ]; then
66
66
67
67
# upload new backup to dropbox
68
68
echo " uploading to dropbox"
69
- $dropboxuploader upload ./backups/$backupfile $backupfile
69
+ $dropboxuploader upload ./backups/$backupfile $dropboxfolder / $ backupfile
70
70
71
- # list older files to be deleted from cloud (exludes last 7 )
72
- # to change dropbox backups retained, change below -7 to whatever you want
71
+ # list older files to be deleted from cloud (exludes last 30 )
72
+ # to change dropbox backups retained, change below -30 to whatever you want
73
73
echo " checking for old backups on dropbox"
74
- files=$( $dropboxuploader list $dropboxfolder | awk {' print $3 ' } | tail -n +2 | head -n -7 )
74
+ files=$( $dropboxuploader list $dropboxfolder | awk {' print $3 ' } | tail -n +2 | head -n -30 )
75
75
76
76
# write files to be deleted to dropbox logfile
77
77
sudo touch $dropboxlog
78
78
sudo chown $USER :$USER $dropboxlog
79
79
echo $files | tr " " " \n" > $dropboxlog
80
80
81
81
# delete files from dropbox as per logfile
82
- echo " deleting old backups from dropbox if they exist - last 7 files are kept"
82
+ echo " deleting old backups from dropbox if they exist - last 30 files are kept"
83
83
84
84
# check older files exist on dropbox, if yes then delete them
85
- if [ $( echo " $files " | grep -c " backup" ) -ne 0 ] ; then
85
+ if [ $( echo " $files " | grep -c " backup" ) -ne 0 ] ; then
86
86
input=$dropboxlog
87
87
while IFS= read -r file
88
88
do
You can’t perform that action at this time.
0 commit comments