BACKUP.D(5)

πŸ“¦
version 1.2.2 Β· 2 versions
  • 1.2.2 Β· debian bookworm, debian trixie, epel 10, epel 9, fedora 43, fedora 44, opensuse-leap 16.0, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 1.2.1 Β· ubuntu jammy
, in debian bookworm, debian trixie, epel 10, epel 9, fedora 43, fedora 44, opensuse-leap 16.0, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– BACKUP.D πŸ’–

okay bestie, so this is the manual page for BACKUP.D from the backupninja package β€” section 5 of the manual, aka the "file formats and conventions" girlies. it's all about the action config files for backupninja(1) and honestly? it's giving organized. πŸŽ€


✨ NAME ✨

BACKUP.D β€” the action configuration files for backupninja(1). that's it, that's the whole name. short, sweet, iconic. πŸ‘‘


🌸 SYNOPSIS 🌸

/etc/backup.d/*

like… all of them. every file in there. periodt.


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea: to actually perform the backup actions, backupninja goes through every action configuration file sitting in /etc/backup.d and sorts out what to do with it based on the file's suffix. the suffix is the vibe check. it tells you what kind of action it is:

  • .sh β€” runs this file as a shell script.
  • .rdiff β€” backup action for rdiff-backup.
  • .restic β€” backup action for restic.
  • .dup β€” backup action for duplicity.
  • .borg β€” backup action for borgbackup.
  • .maildir β€” backup action for slow, incremental rsyncs of tens of thousands of maildirs.
  • .mysql β€” backup action for safe MySQL dumps.
  • .pgsql β€” backup action for safe PostgreSQL dumps.
  • .sys β€” backup action for general system reports and hardware information.
  • .svn β€” backup action for safe backups of subversion repositories.
  • .trac β€” backup action for safe backups of trac repositories.
  • .makecd β€” backup action for burning backups to CD/DVD or creating ISOs.
⚠️ important queen behaviour: these files must be owned by root and must not be world or group readable/writable. no exceptions, no cap.

and if you want more config types? you can add support for additional ones by dropping bash scripts into /usr/share/backupninja with the name of the suffix. go off. πŸ’…


the config files get processed in alphabetical order. that said, the suggestion is to name your config files in "sysvinit style." for example:

10-local.pgsql.disabled
15-runthisfirst.sh
20-runthisnext.mysql
90-runthislast.rdiff

typically you'll put a .rdiff config file last, so that any database dumps you made are included in the filesystem backup. makes sense, right? dump first, back up the dump. main character sequencing. ✨

also, any action configuration ending in .disabled just gets skipped. it's on do-not-disturb. πŸ™ˆ


you can find example templates for the action configuration files in /usr/share/doc/backupninja/examples. you can also use ninjahelper(1) β€” a console based "wizard" for creating backup actions. a literal wizard, bestie. 🧚


🌈 SCHEDULING 🌈

by default, every config file gets processed everyday at 01:00 (1 AM). if that's not your era, you can change it by specifying the 'when' option β€” either in a backup action's config file or in the global configuration file.

special value 'manual' disables scheduling for that backup action entirely. and if you wanna run the backup action by hand, you can do it by invoking ninjahelper(1) with the --run command line argument. 🫢

for example:

when = sundays at 02:00
when = 30th at 22
when = 30 at 22:00
when = everyday at 01
when = Tuesday at 05:00
when = hourly
when = manual

and these values for "when"? invalid. do not pass go, do not collect your backup:

when = everyday at 5:00
when = tuesday at 2am
when = tuesday at 2
when = tues at 02

a configuration file will be processed at the time(s) specified by the "when" option. if multiple "when" options are present, then they all apply β€” it's a stack, not a pick-one. and if two configuration files are scheduled to run in the same hour, then we fall back on the alphabetical ordering specified above. tie broken, slay. ⭐

🚨 the "when" must occur before any sections in the action configuration file. put it up top or it's not gonna work, fr fr.

πŸŽ€ FILE FORMAT πŸŽ€

the file format of the action configuration files is "ini style." sections are created by using square bracket. long lines are connected with a backslash. for example:

# this is a comment
[fishes]
fish = red
fish = blue
[fruit]
apple = yes
pear = no thanks \
i will not have a pear.

see how fish shows up twice? both count. see the backslash at the end of the pear line? that's the line-continuation, keeping it all one value. cute, right? πŸ’œ


πŸ”₯ SEE ALSO πŸ”₯

backupninja(1), ninjahelper(1), backupninja.conf(5),


πŸ‘‘ AUTHOR πŸ‘‘

BACKUPNINJA was written by the riseup.net collective.


and that's the whole page, bestie!! πŸ¦‹πŸ’–

this was the BACKUP.D(5) page, from the backupninja package, and it's dated October 10, 2005, credited to riseup. love that for us. now go name your config files in order and back something up. mwah. πŸ’…βœ¨