Multithreading is also not supported, which strangled my upload throughput to roughly 2 Mbps. This adds unneeded complexity to a script. You then have to delete your full backups to prevent them from bloating space. The big catch is that you can’t run incremental backups indefinitely without compromising the performance of restoring files, so every once in a while you will need to run a full backup. Indeed, the program has been around since August 2002, so one of my early obstacles learning how to use Duplicity was navigating stale 20 year old documentation. I first used Duplicity, but it felt rather dated. However, I suspect that my goals will resonate with other homelab enthusiasts. None of the programs that I’m about to describe are necessarily poor choices, they’re just incompatible with my specific use case and requirements. To me, Kopia is to backups as WireGuard is to VPNs.īut things were a lot rougher before I smoothened my process out. 1 Kopia is an incredibly powerful and underappreciated tool that should be equipped more often in the toolbelts of amateur sysadmins and open-source nerds. However, you can set the environment variables DUPLICACY_PRUNE_OPTIONS and PRUNE_SCHEDULE to perform automatic pruning.If you think something is valuable, then you should back it up.įor over a year now, I’ve been using Kopia to back up my Nextcloud installation and other important homelab files into S3. By default, duplicacy-autobackup does not perform any pruning. If you are backing up a hard drive (and not a SSD), it is recommended to use -threads 1 -stats instead (see here for more details).ĭuplicacy offers an option to prune old backups. DUPLICACY_BACKUP_OPTIONS: options passed to duplicacy backup when a backup is performed.By default, -encrypt if BACKUP_ENCRYPTION_KEY is not empty. DUPLICACY_INIT_OPTIONS: options passed to duplicacy init the first time a backup is made.Equivalent to launching the container and then running docker exec duplicacy-autobackup /app/duplicacy-autobackup.sh backup. BACKUP_IMMEDIATELY ( yes/ no): indicates if a backup should be performed immediately after the container is started.Use the following environment variables if you want to customize duplicacy's behavior. If pre-backup.sh exits with a non-zero status code, the backup will not be performed until the next scheduled backup. For instance if you're backing up a MySQL database, this script can involve doing a mysqldump into /data/mydb.sql. You can have duplicacy-autobackup run a script before and after the backup process by mounting scripts on /scripts/pre-backup.sh and /scripts/post-backup.sh. You will get a prompt asking for your storage provider's credentials, and, if applicable, your encryption key: If you used client-side encryption, add the -encrypt flag: duplicacy init -encrypt backup_name backup_location.Run duplicacy init backup_name backup_location, where backup_name and backup_location correspond to the BACKUP_NAME and BACKUP_LOCATION environment variables of your setup. Install Duplicacy: download the latest Duplicacy binary from its Github page, and put it in your pathĬd to a directory where you'll restore your files, e.g. This shows the procedure to list files, versions, and restore a duplicacy backup made using duplicacy-autobackup. Ghcr.io/christophetd/duplicacy-autobackup:v1.4.0 Viewing and restoring backupsīackups are useless if you don't make sure they work. e BACKUP_ENCRYPTION_KEY= 'correct horse battery staple ' \ $ docker run -d -name duplicacy-autobackup \ If you want to execute an out of schedule backup, you can do so by running the script /app/backup.sh inside the container : Those files must be mounted in the container so that they can be accessed from inside it. Onedrive Business: ONEDRIVE_BUSINESS_TOKEN_FILE*Įnvironment variables marked with an asterix point to files.SSH/SFTP: SSH_PASSWORD or SSH_KEY_FILE*.AWS S3: AWS_ACCESS_KEY_ID and AWS_SECRET_KEY.You need to provide credentials for the storage provider your of your choice using the following environment variables: BACKUP_LOCATION: Duplicacy URI of where to store the backups.Īdditionally, the directory you want to backup must be mounted to /data on the container.Note that this string should be indicated in the UTC timezone. BACKUP_SCHEDULE: Cron-like string to define the frequency at which backups should be made (e.g.BACKUP_ENCRYPTION_KEY: An optional passphrase to encrypt your backups with before they are stored remotely.BACKUP_NAME: The name of your backup (should be unique, e.g.The following environment variables can be used to configure the backup strategy. and more generally, all the features that duplicacy has. Multiple storage backends: S3, Backblaze B2, Hubic, Dropbox, SFTP.It uses duplicacy under the hood, and therefore supports: Duplicacy Autobackup is a Docker image to easily perform automated backups.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |