BACKUPNINJA(1)

🌸 NAME 🌸

okay so, bestie, meet BACKUPNINJA β€” a lightweight, extensible meta-backup system, and its whole entire tagline is "a silent flower blossom death strike to lost data." πŸ’… iconic behavior honestly. this is backupninja(1), section 1 of the manual, and she is here to make your backups not a whole tragedy. πŸ¦‹


✨ SYNOPSIS ✨

backupninja [ -h ] [ -v ] [ -d ] [ -n ] [ -t ] [ -f filename ] [ --run
filename ]
ngl the synopsis says -v and the options list below says -V and i'm literally just the messenger bestie, i copy what the page says, i don't editorialize πŸ”₯

πŸ’œ DESCRIPTION πŸ’œ

Backupninja lets you coordinate system backups by dropping a few simple configuration files into /etc/backup.d/. πŸŽ€

Here's the tea: most programs you might use for making backups don't have their own configuration file format. Backupninja is your centralized girl β€” she configures and coordinates many different backup utilities, all from one place. no cap. πŸ‘‘


πŸ¦‹ FEATURES πŸ¦‹

  • easy to read ini style configuration files. ✨
  • you can drop in scripts to handle new types of backups. 🫢
  • backup actions can be scheduled. ⏰
  • you can choose when status report emails are mailed to you: always, on warning, on error, or never. πŸ“¬
  • the console-based wizard, ninjahelper, makes it easy to create backup action configuration files. 🧚
  • passwords are never sent via the command line to helper programs. πŸ”’ (we love a security-conscious queen)
  • in order to backup a db or sql database, you cannot simply copy database files. backupninja helps you safely export the data to a format which you can backup. πŸ“

Backup types include:

  • secure, remote, incremental filesystem backup (via rdiff-backup). incremental data is compressed. permissions are retained even with an unprivileged backup user. πŸ’–
  • basic system and hardware information. πŸ–₯️
  • encrypted remote backups (via duplicity). πŸ”
  • safe backup of MySQL, PostgreSQL, OpenLDAP, and subversion databases. πŸ—„οΈ
  • burn CD/DVDs or create ISOs. πŸ’Ώ

πŸ’… OPTIONS πŸ’…

  • -h, --help β€” Show summary of options. your little helper bestie. πŸ™ˆ
  • -V, --version β€” Show backupninja version number. so you know exactly which queen you're talking to. πŸ‘‘
  • -d, --debug β€” Run in debug mode, where all log messages are output to the current shell. everything is out loud now. 😭
  • -f, --conffile CONF_FILE β€” Use CONF_FILE for the main configuration instead of /etc/backupninja.conf. choose your own adventure. 🌈
  • -t, --test β€” Run in test mode, no actions are actually taken. a dress rehearsal, zero commitment. πŸ’…
  • -n, --now β€” Perform actions now, instead of when they might be scheduled. main character energy, no waiting. πŸ”₯
  • --run ACTION_FILE β€” Runs the action configuration ACTION_FILE and exits. one and done. ⭐

πŸŽ€ CONFIGURATION πŸŽ€

General settings are configured in /etc/backupninja.conf. In this file you can set the log level and change the default directory locations. See backupninja.conf(5). 🫢

To preform the actual backup actions, backupninja processes each action configuration file in /etc/backup.d according to the file's suffix. See backup.d(5). πŸ—‚οΈ


🌈 EXAMPLE USAGE 🌈

Backupninja can be used to implement whatever backup strategy you choose. It is intended, however, to be used like so:

First, databases are safely copied or exported to /var/backups. Often, you cannot make a file backup of a database while it is in use, hence the need to use special tools to make a safe copy or export into /var/backups. πŸ—„οΈβœ¨

Then, vital parts of the file system, including /var/backups, are nightly pushed to a remote, off-site, hard disk (using rdiff-backup). The local user is root, but the remote user is not privileged. Hopefully, the remote filesystem is encrypted. πŸ”

In order for this to work (ie for diff-backup to run unattended), you must create ssh keys on the source server and copy the public key to the remote user's authorized keys file. For example:

root@srchost# ssh-keygen -t rsa -b 4096
root@srchost# ssh-copy-id -i /root/.ssh/id_dsa.pub
backup@desthost

Now, you should be able to ssh from user root on srchost to user backup on desthost without specifying a password. When prompted for a password by ssh-keygen, just leave it blank by hitting return. The "wizard" ninjahelper(1) will walk you through these steps. πŸ§šβ™€οΈ


⭐ EXIT VALUES ⭐

  • 0 β€” success πŸŽ‰
  • 1 β€” errors or warnings emitted during backup 😬
  • 2 β€” one or more backup actions failed πŸ’€
  • 3 β€” syntax or usage error πŸ™ˆ

πŸ’– FILES πŸ’–

  • /usr/sbin/backupninja β€” main script πŸ‘‘
  • /etc/backupninja.conf β€” main configuration file; general options βš™οΈ
  • /etc/cron.d/backupninja β€” runs main script hourly ⏰
  • /etc/logrotate.d/backupninja β€” rotates backupninja.log πŸŒ€
  • /etc/backup.d β€” directory for configuration files πŸ—‚οΈ
  • /usr/share/backupninja β€” directory for handler scripts πŸ› οΈ
  • /usr/share/doc/backupninja/examples β€” example action configuration files. πŸ“š

🌸 SEE ALSO 🌸

ninjahelper(1), backupninja.conf(5), backup.d(5), 🫢


πŸ’œ AUTHOR πŸ’œ

BACKUPNINJA was written by the riseup.net collective. 🌹 absolute legends, periodt.


and that's the whole page bestie!! πŸ’– this one came from the backupninja package, footer says riseup and the date is October 10, 2005 β€” so yeah, vintage icon behavior, still slaying. go make some backups, ily, bye!! πŸŽ€πŸ¦‹βœ¨