2

I'm trying to do a full system backup on my remote server. I want to use Borg for this process because it has deduplication so it only copies files that are different and thus doesn't use as much space as a regular backup. Currently I'm using the command that follows:

sudo borg create --stats --progress --one-file-system --compression lz4 backup::Monday /run/media/archie/server/{bin,boot,etc,home,lib,lib64,opt,root,run,sbin,srv,tmp,usr}

This doesn't look like an optimal solution so how can I make it better? Or is there any other tool with deduplication for this job?

4
  • What is the problem you are having? Jul 14, 2021 at 18:23
  • It looks messy and I don't think this is an optimal solution. Jul 14, 2021 at 18:51
  • Huh? Where is the messy bit? Where is the not optimal bit? Jul 14, 2021 at 18:52
  • {bin,boot,etc,home,lib,lib64...} bit is quite messy and if there were to be other files added this script won't back them up. Jul 14, 2021 at 18:54

1 Answer 1

3

I've solved the problem with this script:

borg create --stats --progress --compress lz4 --one-file-system \
    --exclude $SERVER/dev \
    --exclude $SERVER/mnt \
    --exclude $SERVER/proc \
    --exclude $SERVER/run \
    --exclude $SERVER/swapfile \
    --exclude $SERVER/tmp \
    --exclude $SERVER/sys \
    --exclude $SERVER/lost+found \
    $BACKUP::$DAY $SERVER 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .