bup-save(1)

πŸ’– NAME πŸ’–

okay bestie, welcome to bup-save(1) β€” this is the General Commands Manual page for it, and it does exactly one iconic thing: create a new bup backup set. no cap.


🌸 SYNOPSIS 🌸

bup save [-r host:path] <-t|-c|-n name> [-#] [-f indexfile] [-v] [-q]
[--smaller=maxsize] <paths...>;

(it's giving slay but also it's giving a lot of flags. we'll get through it together 🫢)


πŸ¦‹ DESCRIPTION πŸ¦‹

so bup save takes the contents of the files or paths you hand it and saves them into a new backup set, and optionally gives that backup set a name. that's the whole vibe. ✨

⚠️ real talk: if you ever wanna refer back to your backup set later (like, for restoration, the whole point), you must either pass --name (this is the normal case, do this), or write down the tree or commit id that --tree or --commit prints out. otherwise it's just... gone, bestie. πŸ’€

before you even try to bup save anything, you should first update the index using bup index. why are these two separate steps? the reasons are all spelled out in the man page for bup-index(1). go read it, i'll wait πŸ’…

by default, metadata gets saved for every path, and the metadata for any unindexed parent directories of indexed paths is taken directly from the filesystem. however β€” if you specify --strip, --strip-path, or --graft, then metadata will not be saved for the root directory (/). if you wanna know more about how metadata is handled, go see bup-restore(1). πŸŽ€


πŸ‘‘ OPTIONS πŸ‘‘

  • -r, --remote=[user@]host:[path], --remote=URL β€” saves the data to the specified remote repository, by default via SSH. see bup(1) REMOTE OPTIONS for the full tea. 🌈
  • -t, --tree β€” after creating the backup set, prints out the git tree id of the resulting backup. πŸ‘‘
  • -c, --commit β€” after creating the backup set, prints out the git commit id of the resulting backup. 🌟
  • -n, --name=name β€” after creating the backup set, creates a git branch named name so you can access that backup by name. if name already exists, the new backup is considered a descendant of the old name. (so yes β€” you can keep making new backup sets with the same name forever, and later scroll the history of that backup set to see how your files changed over time. main character behavior fr fr. 🫢)
  • -d, --date=date β€” specify the date of the backup, in seconds since the epoch, instead of using the current time. πŸ•°οΈ
  • -f, --indexfile=indexfile β€” use a different index filename instead of $BUP_DIR/bupindex. πŸ’œ
  • -v, --verbose β€” bumps up verbosity (can be used more than once). with one -v, it prints every directory name as it gets backed up. with two -v, it also prints every filename. 😭 the receipts.
  • -q, --quiet β€” disables progress messages. peace and quiet, periodt. 🀫
  • --smaller=maxsize β€” doesn't back up files that are >= maxsize bytes. you use this to run frequent incremental backups of your small files (which usually back up fast) and skip over the big ones (like virtual machine images, which take longer). then you back up the big files less often. use a suffix like k, M, or G to specify multiples of 1024, 1024*1024, 1024*1024*1024 respectively. πŸ“
  • --bwlimit=bytes/sec β€” doesn't transmit more than bytes/sec bytes per second to the server. this is good actually, because it means your backups don't suck up all your network bandwidth. use a suffix like k, M, or G to specify multiples of 1024, 1024*1024, 1024*1024*1024 respectively. 🌊
  • --strip β€” strips the path that is given from all files and directories.

a directory /root/chroot/etc saved with bup save -n chroot --strip /root/chroot would be saved as /etc. note that currently, metadata will not be saved for the root directory (/) when this option is specified. 😬

  • --strip-path=path-prefix β€” strips the given path prefix path-prefix from all files and directories.

a directory /root/chroot/webserver/etc saved with bup save -n webserver --strip-path=/root/chroot /root/chroot/webserver/etc would be saved as /webserver/etc. note that currently, metadata will not be saved for the root directory (/) when this option is specified. 😬

  • --graft=old_path=new_path β€” a graft point old_path=new_path (can be used more than once).

a directory /root/chroot/a/etc saved with bup save -n chroot --graft /root/chroot/a=/chroot/a would be saved as /chroot/a/etc. note that currently, metadata will not be saved for the root directory (/) when this option is specified. 😬

  • -#, --compress=# β€” set the compression level to # (a value from 0-9, where 9 is the highest and 0 is no compression). defaults to a configured pack.compression or core.compression, or 1 (fast, loose compression). πŸ—œοΈ

🧚 SETTINGS 🧚

bup save honors the bup.split.trees configuration option (see bup-config(5)).

⚠️ note: it has to be set in the repository being written to. so like β€” in the BUP_DIR or -d repository for bup save ... without -r, and in the remote repository for bup save -r .... don't @ me, that's just how it is πŸ’…

🌈 EXAMPLES 🌈

$ bup index -ux /etc
Indexing: 1981, done.

$ bup save -r myserver: -n my-pc-backup --bwlimit=50k /etc
Reading index: 1981, done.
Saving: 100.00% (998/998k, 1981/1981 files), done.

$ ls /home/joe/chroot/httpd
bin var

$ bup index -ux /home/joe/chroot/httpd
Indexing: 1337, done.

$ bup save --strip -n joes-httpd-chroot /home/joe/chroot/httpd
Reading index: 1337, done.
Saving: 100.00% (998/998k, 1337/1337 files), done.

$ bup ls joes-httpd-chroot/latest/
bin/
var/

$ bup save --strip-path=/home/joe/chroot -n joes-chroot \
     /home/joe/chroot/httpd
Reading index: 1337, done.
Saving: 100.00% (998/998k, 1337/1337 files), done.

$ bup ls joes-chroot/latest/
httpd/

$ bup save --graft /home/joe/chroot/httpd=/http-chroot \
     -n joe
     /home/joe/chroot/httpd
Reading index: 1337, done.
Saving: 100.00% (998/998k, 1337/1337 files), done.

$ bup ls joe/latest/
http-chroot/

πŸŽ€ SEE ALSO πŸŽ€

bup-index(1), bup-split(1), bup-on(1), bup-restore(1), ssh_config(5)


πŸ’œ BUP πŸ’œ

part of the bup(1) suite. we're all one big happy family here 🫢


⭐ AUTHORS ⭐

Avery Pennarun apenwarr@gmail.com πŸ‘‘


and that's the whole page bestie!! this was Bup 0.34, dated 2026-09-01 β€” slay, iconic, no notes πŸ’…βœ¨πŸ’–

πŸ“¦ where this page comes from