Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

TeslaMate [megathread]

This site may earn commission on affiliate links.
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

now=`date +"%A"`

cd /home/pi/tmbackup

sudo /usr/local/bin/docker-compose exec -T database pg_dump -U teslamate teslamate > /home/pi/tmbackup/teslamate.bck_${now}

rclone copy --max-age 24h /home/pi/tmbackup --include 'teslamate.*' gdrive:TeslaMate

The above is mine, the only difference looks to be the characters around the 'date +"%A"' can you try and copy mine from above into yours? Might be a formatting thing (again!)
 
  • Love
Reactions: Roy W.
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

now=`date +"%A"`

cd /home/pi/tmbackup

sudo /usr/local/bin/docker-compose exec -T database pg_dump -U teslamate teslamate > /home/pi/tmbackup/teslamate.bck_${now}

rclone copy --max-age 24h /home/pi/tmbackup --include 'teslamate.*' gdrive:TeslaMate

The above is mine, the only difference looks to be the characters around the 'date +"%A"' can you try and copy mine from above into yours? Might be a formatting thing (again!)
Yay, that worked! I just copied your text into the editor. Now I've got the file called teslamate.bck_Thursday as expected.

Very many thanks for your help.
 
  • Like
Reactions: DaveW
Legendary. Took me maybe 5 mins, changed a few things; %d instead of %A and the gdrive folder as a subdir but otherwise spot on. Nice one.

Excellent stuff :) - glad the guide works OK.

Just had to drive less than a mile to go collect a takeaway (normally walk, but I’ve had my permitted exercise for the day). Looking forward to seeing my tiny journey on the map :D
 
  • Like
Reactions: Roy W.
Is that the one that you use to use for AIS tracking now that there are no ships to watch? :D

Today, in the complate absence of Tesla related shipping, I mostly be monitoring the skies.
Screenshot 2020-05-07 at 19.26.32.png


This is running on a Pi 4. In normal times I would have about 200 - 250 aircraft visible but at the moment its 15.
I have noticed it's busier this week though.
 
  • Like
Reactions: MrBadger
Just checking in @Mr Miserable @Roy W. @Russinating that your backups worked this morning? :)

View attachment 539751
Yes and no here!

I’ve got the correct teslamate.bck_Friday file created at 0300, but I’ve also got a second file again called teslamate.bck_date +"%A" also created at 0300!

At least two files are better than none!

I’ve not had chance to look at it yet, but I assume I didn’t delete something I should have yesterday...:rolleyes:
 
  • Like
Reactions: DaveW
Yes and no here!

I’ve got the correct teslamate.bck_Friday file created at 0300, but I’ve also got a second file again called teslamate.bck_date +"%A" also created at 0300!

At least two files are better than none!

I’ve not had chance to look at it yet, but I assume I didn’t delete something I should have yesterday...:rolleyes:

Double backups, for when you are really worried about losing data!