Mastodon Backup and Search
body
I like to have a local copy of the toots I wrote and that mention me, for backup purposes and to search them. To this end, I use https://github.com/kensanata/mastodon-backup.
The shell script to do the backup:
mkdir -p ~/Documents/Mastodon/
cd ~/Documents/Mastodon/ || exit
accounts=brab@framapiaf.org
echo Archive Statuses, Favourites, Mentions
for acc in $accounts; do
echo "$acc"
mastodon-archive archive --with-mentions "$acc"
mastodon-archive media --collection favourites "$acc"
done
git add .
git commit -m "Mastodon Backup"
The shell script to do the search:
cd ~/Documents/Mastodon/ || exit mastodon-archive text --collection all brab@framapiaf.org "$@"