3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

harvestars.datのような小さめのバイナリファイルをお手軽バックアップ

Posted at

harvestars.dat のようにサイズが小さいバイナリファイルを手軽にバックアップしたりテキストベースで他のサーバに移行する

base64へのエンコード

ファイルに出力する場合

base64 harvesters.dat > encoded.txt

encoded.txtというテキストファイルにbase64文字列で出力されます。

標準出力に表示

ターミナルからコピペするならこっちが楽

base64 harvesters.dat > encoded.txt

base64からデコード

base64 -d encoded.txt > harvesters.dat

これだけ

検証する

新旧サーバーで以下のコマンドを実行してハッシュが一致したらOK

md5sum harvesters.dat 

応用

cronで定期的にGoogle SpreadSheetにpostするようなプログラム書いておくとバックアップになって良いかと。(その際はついでにaddresses.ymlも!)

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?