1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

cronバックアップ

Posted at

本番でcrontabが消えた

crontab -e と crontab -rは隣のキーだからね・・・

バックアップをとろう

そもそも実体はどこにあるのか

/var/spool/cron/xxx

cronでバックアップ

#####################################
# cron バックアップ
#####################################
0 4 * * 1 cp -apr /var/spool/cron/xxxx /cron_bkup/

復旧

バックアップディレクトリにある"root"をテキストで開けばフルバックアップされています
/var/spool/cron/rootを入れ替えても同じ。

備忘録

git管理+ファイルdeployも考えたけどてっとりばやかったのでコレでいいや。

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?