• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

kedamaDQ/backup-mastodon: Periodical backup scripts for mastodon servers.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

kedamaDQ/backup-mastodon

开源软件地址(OpenSource Url):

https://github.com/kedamaDQ/backup-mastodon

开源编程语言(OpenSource Language):

Shell 100.0%

开源软件介绍(OpenSource Introduction):

backup-mastodon

Periodical backup scripts for mastodon servers.

dependencies

  • pg_dump / pg_restore
  • redis-cli

setup

clone this repository

$ git clone https://github.com/kedamaDQ/backup-mastodon.git

copy sample .env files and edit according to your environment

$ cd backup-mastodon
$ cp .env.backup-mastodon.sample .env.backup-mastodon
$ cp backup-mastodon.d/.env.backup-postgresql.sample backup-mastodon.d/.env.backup-postgresql
$ cp backup-mastodon.d/.env.backup-redis.sample backup-mastodon.d/.env.backup-redis

.env files are:

  • /.env.backup-mastodon
  • /backup-mastodon.d/.env.backup-postgresql
  • /backup-mastodon.d/.env.backup-redis

edit .env files with your favourite editor.

$ vi .env.backup-mastodon
$ vi backup-mastodon.d/.env.backup-postgresql
$ vi backup-mastodon.d/.env.backup-redis

test run

run as root.

# ./backup-mastodon.sh

if succeeded, 3 files are created in directory which is defined by environment variable ${BACKUP_DEST_DIR} in /.env.backup-mastodon.

periodical backing up

create drop-in file in /etc/cron.d.

03 04 * * * root /bin/bash /path/to/backup-mastodon/backup-mastodon.sh > /tmp/backup-mastodon.out 2>&1

or edit root's crontab.

03 04 * * * /bin/bash /path/to/backup-mastodon/backup-mastodon.sh > /tmp/backup-mastodon.out 2>&1

note

if you use tcp/ip to connect to postgresql, put a file .pgpass in directory /root. (such as if postgresql is running on another host)

<host>:<port>:<db name>:<user>:<password>

for example:

127.0.0.1:5432:mastodon_production:mastodon:mastodonpassword

note2

Also even if using tcp/ip to connect to postgresql, these scripts will work correctly. MAYBE.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
en30/ruboty-mastodon发布时间:2022-08-18
下一篇:
stillinbeta/gke-mastodon发布时间:2022-08-18
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap