Main Page
Rants And Humor (I guess you might call it a blog)
“ | You must realize that the computer has it in for you. The irrefutable proof of this is that the computer always does what you tell it to do. | ” |
—Unattributed fortune |
“ | Know your enemy and know yourself and you can fight a thousand battles without disaster. [...]
One hundred victories in one hundred battles is not the most skillful. Seizing the enemy without fighting is the most skillful. [...] All warfare is based on deception. |
” |
—Sun Tzu |
Computers aren't my thing. They're out to get us. I will know myself, know computers (the enemy), redesign (deceive) them, and thus seize victory without working (fighting).
This is where I rant. Everything here is Copyright Me, All Rights Reserved, so don't download any of it (oops too late, now they're out to get you).
Me
Don't email me or else I won't respond: bilbo@hobbiton.org
Other things I do:
- CPAN I sometimes publish software on CPAN.
- Devpit.org, Bilbo I founded and host and contribute to Devpit.org.
- Eye Correction/ Completed journal of my corrective eye surgery.
- FreeBSD Ports I occasionally contribute a thing or two to FreeBSD's Ports collection.
- Hobbiton.org is a server for friends and me to do unencumbered email, web pages, shell stuff, etc. (It's for friends only, so if I don't know who you are don't ask.) This used to be an open shell server with 101,796 users running OpenBSD. While the open service is long gone, the facade remains at http://web.archive.org/web/20010620044004/www.hobbiton.org/ .
- Hosting
- Papers I published
- Pit programming langauge I'm creating a new programming language.
- Polyphasic Sleep/ I attempted to switch to polyphasic sleep.
- Puff I'm the author of Puff, a text editor built for simplicity.
- rsync-backup I'm the author of rsync-backup, a work in progress for online backups.
- Tangents
- Wikipedia.org, Bilbo1507 Ya, Bilbo was taken. {sigh}
Publications
Chronological Entries
Syncthing To Back Up Android SD Card
2019-11-24
Syncthing is pretty cool. It's particularly handy for backing up your Android's SD card to FreeBSD. Why? So you can drop it on a stable machine where you've already been maintaining proper periodic backups. Most of this is pretty obvious for the looking, so I'll be terse:
$ pkg install syncthing Then in /etc/rc.conf: syncthing_enable="YES" syncthing_home="/project/syncthing/.config" syncthing_log_file="${syncthing_home}/syncthing.log" $ mkdir /project/syncthing $ chown syncthing:syncthing /project/syncthing $ service syncthing start
Now (if needed) ssh -L 8384:localhost:8384 so you can use a browser to log in to http://localhost:8384. Set a password, set it to listen on your network instead of only localhost, and Bob's your uncle. Install the Syncthing app from Play Store, and share your SD card. Just follow the GUI. I suggest setting the Android side to sync only when on wifi and charging. Now it'll sync when you're sleeping and it's on the fast local network.
Other tips:
- It's bidirectional, so besides backing up your SD card, you can load and load things like pictures, podcasts, audiobooks, music, etc by just manipulating the files on the server.
- Turn off Global Discover and NAT Traversal and Relay Service for security, unless you need them.
- Tell it to exclude Android/** to avoid syncing unnecessary junk like the Google Maps cache. Then the transfer is reasonably slim.
- Select Oldest First for File Pull Order, and I suspect it'll keep up better if the most recent files have a lot of churn.
- Once, I had the Android app stop accepting connections, and the FreeBSD side indicated "Disconnected" and "Out of sync". nc to port 22000 indicated "Connection refused". I killed the app and opened it again, and it started accepting connections. I suppose the actual syncthing process died or something.