Exponential Increase in Backup Storage
We are using restic with backend AWS S3. I notice that every time backup runs, the storage space increases by current server space, though it is incremental backup.
The first backup stored 30GB. The second the time the command was run, the storage space used is 60GB, even though very few files were added, less then few KBs.
The command I use to schedule backups:-
/usr/bin/ionice -c2 -n0 restic --quiet --host servername backup / --exclude=*.log
I was expecting only increment data to add up to the storage. Am I doing something wrong?
We are currently using restic_0.9.4_linux_amd64 binary.
Backup Speed
Also the backup takes a lot of time. In another case, I saw first backup of 17GB on VPS take 32 hrs.
The storage and server should be like 50-70ms apart. I was running with nice -n19.
I am currently testing without “nice”.
Next, I may try with other options of ionice. Anyone tested with ionice can make any recommendations?
From what you describe it sounds like restic includes its own cache directory in the backup, which nicely explains the exponential space increase you see. It should not do that, but can you please check it?
$ restic help stats
The "stats" command walks one or all snapshots in a repository and
accumulates statistics about the data stored therein. It reports on
the number of unique files and their sizes, according to one of
the counting modes as given by the --mode flag.
If no snapshot is specified, all snapshots will be considered. Some
modes make more sense over just a single snapshot, while others
are useful across all snapshots, depending on what you are trying
to calculate.
The modes are:
* restore-size: (default) Counts the size of the restored files.
* files-by-contents: Counts total size of files, where a file is
considered unique if it has unique contents.
* raw-data: Counts the size of blobs in the repository, regardless of
how many files reference them.
* blobs-per-file: A combination of files-by-contents and raw-data.
Refer to the online manual for more details about each mode.