gcgarner / IOTstack

docker stack for getting started on IOT on the Raspberry PI
GNU General Public License v3.0
1.52k stars 582 forks source link

Dropbox backup creates wrong filetype on Dropbox #127

Open eriktheV-king opened 4 years ago

eriktheV-king commented 4 years ago

Hello and congrats to all working on this wonderful project! When installed on my Pi3B+, docker_backup.sh seems to create a file named IOTstackBU, without any extension, in the Apps folder on my dropbox. I can untarzip this extensionless file without any problem, to extract the supposed backup set of files, as correctly created by docker_backup.sh in the ~/IOTstack/backups folder where it was correctly named backupfile.tar.gz To make docker_backup.sh work correctly, line 61 should be changed to : $dropboxuploader upload ./backups/$backupfile $backupfile (instead of $dropboxuploader upload ./backups/$backupfile $dropboxfolder) The result will be a correctly named tarzipped file with the correct extension in your Apps folder on Dropbox.

WagnerAlex commented 4 years ago

I had a similar problem but now it works. You should try to use absolute paths everywhere in the script.

    #setup variables
    dropboxfolder=/IOTstackBU
    dropboxuploader=/home/pi/Dropbox-Uploader/dropbox_uploader.sh
    dropboxlog=./backups/log_dropbox.txt

    #upload new backup to dropbox
    echo "uploading to dropbox"
    $dropboxuploader upload ./backups/$backupfile $dropboxfolder
DIYtechie commented 4 years ago

dropboxuploader upload ./backups/$backupfile $backupfile

thank you very much @eriktheV-king. I can confirm that this works. @gcgarner please integrate this correction.