andreafabrizi / Dropbox-Uploader

Dropbox Uploader is a BASH script which can be used to upload, download, list or delete files from Dropbox, an online file sharing, synchronization and backup service.
https://www.andreafabrizi.it/2016/01/01/Dropbox-Uploader/
GNU General Public License v3.0
6.56k stars 1.08k forks source link

How to prevent duplicated folders #491

Open gidimiz opened 5 years ago

gidimiz commented 5 years ago

Im trying to backup my crontabs folder using this command: /home/pi/dropbox_uploader.sh upload /var/spool/cron/crontabs /crontabs The first time that I run this, everything is fine and I get a new folder called crontabs under my dropbox apps folder. ( Dropbox > Apps > Backup >crontabs ) The second time that I run this line again without any changes ( as a weekly backup ), the API opens a new folder under the already existing folder, so i get this folder structure now: Dropbox > Apps > Backup > crontabs > crontabs The third time I run the same command I get:

Creating Directory "/crontabs/crontabs"... FAILED Skipping file "/var/spool/cron/crontabs/pi", file exists with the same hash Skipping file "/var/spool/cron/crontabs/root", file exists with the same hash Some error occurred. Please check the log.

Why is it duplicated the folders and how can I prevent this?

Thanks.

minimalart commented 4 years ago

I have this issue too. I tried with and without trailing slash and I got random results

Thanks for any help!

ccomincini commented 3 years ago

Don't Know if I'm right but putting a trailing slash at the destination dir and removing at the source I've no more the issue

dropbox-uploader upload /dir/dir/source /destination_container/ give me everytime a /destination_container/source