Backup /home/username
, /var/www/virtual/username
and MySQL databases from
your Uberspace.
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
Create a local .tar.bz2-archive instead of syncing all files incrementally (placed into ~/uberspace-backups/archives
).
Specify the backup destination, defaults to ~/uberspace-backups
.
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.
Specify the location of your ssh configuration file, defaults to
~/.ssh/config
.
The backup directory is structured similar to Uberspace’s own backup system.
/home/username
→home/username
/var/www/virtual/username
→var/www/virtual/username
- MySQL databases →
mysqlbackup/username/all-databases.sql.xz
Inspired by pheraph’s backup-uberspace.sh and DirkR’s uberspaces.pl.
uberspace-backup.sh
is licensed under the MIT license. See
uberspace-backup.sh
itself for the full license.