Hello! Should I archive files before uploading them to remote repository?
Welcome here @Deliable !
To me it is not at all clear what you are asking, since you have told us nothing about your setup and goal etc.
Restic is a backup program which has nothing to do with archiving.
This is, I believe the most simple way if using restic:
- You connect a USA drive to the computer which has the files you want to back up.
- You run restic and basically you tell it a) where the files you want to back up are and b) where on the USB drive you have the repository.
I suggest you read Restic Documentation — restic 0.17.3-dev documentation , especially the Quick Start Guide chapter. Good luck and welcome back with more specific questions!
Hello! Sorry if I didn’t describe what I meant correctly. What I meant is this: I want to backup 2 folders and 3 files. Should I compress all of these in a single tar.gz archive and run “restic backup” like that, or should I just run “restic backup” by giving it all these 2 folders and 3 files?
And what makes you think that compressing and tar-ing them before can be beneficial?
You still have not explained what you want to achieve. Either way can make sense sometimes.
I am trying to achieve fast transfers at the moment. I’m just wondering which way would be better.
Also should I go with SFTP or WebDAV?
BTW what are “fast transfers”?
Backup is not archive. You can easily google what differences are. Read it and think what you really want. What is your goal. It will drive what you need.
Restic is backup software so if you need archiving you have to look somewhere else IMO.
What I’m asking is, when I run “restic backup”, should I pass it the folders and files I want to back up, or an archive of those folders and files? What I mean by fast transfers is basically the backup should be done fast.
It’s up to you. What do you want to do? You are backing up these files. When it come time, if it ever does, to restore these files, do you want to retrieve them as zip files or the raw files?
Restic offers compression, so you probably won’t save a lot of space if you zip them up. You’ll also potentially lose any benefits if you then upload similar files later that can be deduplicated with the files you have.
But it’s 100% up to you, there’s no right answer. Like @kapitainsky said, think about what you’re trying to achieve and what your workflow will be when it comes time to restore the data. Will having to download an entire zipped archive before you can get at the files within it be a hassle?
Will it be faster? Good question, are you counting the time it takes to zip/archive the files with a seperate app in your time? If not, then yes using restic to backup already compressed files will be “faster” because the compression has already been done.
If you DO decide to backup files you’ve already compressed/archived, you can tell restic to disable compression so it doesn’t try to detect if it can compress itself.
Personally I don’t zip/archive anything, I backup the data as it is, I see no reason to preprocess it beforehand. They’re live Linux filesystems, trying to zip them would be hard.
And I would not be so sure about it neither:) It will be faster if a bottleneck is CPU or IO which is unlikely in most cases IMO. Compression speed (zstd restic uses) on any relatively modern CPU is real fast. So unless it is some super slow single core CPU on very fast internet link (many GiB range speed) it does not matter.
In other words in most cases all process is waiting for data to be uploaded and not for local data processing.
So from what I understood, you’re saying the compression restic makes is enough?
It won’t be faster when you create compressed tar files. And by not doing it you avoid plenty of extra steps (when something can go wrong).
There is no need to compress data. Restic already have.
ZSTD compression builtin