Skip to content

Latest commit

 

History

History
 
 

backup

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

uberspace-backup.sh

Backup /home/username, /var/www/virtual/username and MySQL databases from your Uberspace.

Usage

Simply running

$ ./uberspace-backup.sh

will read all Uberspace accounts from ~/.ssh/config and perform a backup to ~/uberspace-backups.

Here’s a more advanced example (using all possible command line arguments):

$ ./uberspace-backup.sh -a -h uberspace-johndoe -h uberspace-galaxy -b ~/backups -s /etc/ssh/ssh_config

Command line arguments [arguments]

-a

Create a local .tar.bz2-archive instead of syncing all files incrementally (placed into ~/uberspace-backups/archives).

-b backup-dir

Specify the backup destination, defaults to ~/uberspace-backups.

-h host

Specify host(s) to backup. The host has to exist in your ssh config. You can pass this argument multiple times to specify multiple hosts.

-s ssh-config-file

Specify the location of your ssh configuration file, defaults to ~/.ssh/config.

Backup directory structure

The backup directory is structured similar to Uberspace’s own backup system.

  • /home/usernamehome/username
  • /var/www/virtual/usernamevar/www/virtual/username
  • MySQL databases → mysqlbackup/username/all-databases.sql.xz

Credits

Inspired by pheraph’s backup-uberspace.sh and DirkR’s uberspaces.pl.

License

uberspace-backup.sh is licensed under the MIT license. See uberspace-backup.sh itself for the full license.