Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

0 votes
1 answers
136 views
How do I automatically do daily backups and on every shutdown, and restore them elsewhere daily and on boot?
Situation: three servers, **primary** (source of data to be backed up), **store** (storage for backup), **secondary** (target to restore onto). I'd like to make sure that my workplace secondary always has data that's at most a day old (in fact, my whole `/home`). How can I do that with `restic`? Pla...
Situation: three servers, **primary** (source of data to be backed up), **store** (storage for backup), **secondary** (target to restore onto). I'd like to make sure that my workplace secondary always has data that's at most a day old (in fact, my whole /home). How can I do that with restic? Platform: Modern non-esoteric Desktop/Server Linux distro (i.e., Fedora clients, debian server). I can access my servers via SSH and public key auth.
Marcus Müller (47282 rep)
Jan 20, 2025, 03:46 PM • Last activity: Jan 21, 2025, 04:32 PM
1 votes
3 answers
336 views
The proper way to backup
I want do regular, automated backups to a raspberry pi in my homenetwork. It is sufficient to do backups, when at home. Every singe guide I read on 'how to do automated backups' tells me to put a passwordless ssh-key on my pi. I don't want to do this, because anyone with access to my pc, would have...
I want do regular, automated backups to a raspberry pi in my homenetwork. It is sufficient to do backups, when at home. Every singe guide I read on 'how to do automated backups' tells me to put a passwordless ssh-key on my pi. I don't want to do this, because anyone with access to my pc, would have access to my backups which completely annihilates one purpose of backups. My current solution is a password protected ssh-key and a rsync script. It took some time to make it work, but now I am prompted for the password as soon as I login at my home network, followed by a backup. Now I want to use restic since I need some type of versioned backup. Also I want to backup other devices as well. The restic guide, again tells me to use a passwordless ssh-key. Now, I had the idea to do it the other way around. I.e. my (offline) pi can ssh into my laptop without password (but resticted to resric use). I could run some systemd.timer with a script that checks if my laptop is reachable and start a backup, if this is the case. However, this seems quite hacky and I am convinced that this is some common szenario. But I can't find any guides for it. Can you point me into a general direction? Even some terminology would help, so I can find more information on what I want to do!
grbll (35 rep)
Mar 11, 2024, 01:57 PM • Last activity: Mar 12, 2024, 11:02 AM
0 votes
1 answers
283 views
How to configure separate ports and keys for restic usage?
I want to use `restic` for remote backups, but seeing as SFTP and SSH will both require access to the system, is there some way to configure the SSH access to the server in such a way that the directories accessible by SSH and SFTP are protected from each other? By that I mean connecting to the serv...
I want to use restic for remote backups, but seeing as SFTP and SSH will both require access to the system, is there some way to configure the SSH access to the server in such a way that the directories accessible by SSH and SFTP are protected from each other? By that I mean connecting to the server using the SSH key for normal user logons (which grant access to a terminal) will not grant access to the directories used for the restic backup, and vice versa, ie connection with SFTP will not grant access to the terminal like the regular logon. The idea is that if one of the keys get compromised the other will not be affected. The only way I can think of is if the HTTP based remote server option is used, which can probably create directories that cannot be directly accessed from the regular user login.
vfclists (7909 rep)
Feb 21, 2024, 05:00 PM • Last activity: Mar 12, 2024, 10:17 AM
7 votes
3 answers
4760 views
Finding an appropriate backup strategy (borgbackup, restic etc)
I am fully aware that questions like this one have been asked multiple times. However, since reading lots of documentation of various backup tools didn't answer all my questions, I think its fine to describe my scenario here to get some input. I want to develop a backup strategy that suits my needs....
I am fully aware that questions like this one have been asked multiple times. However, since reading lots of documentation of various backup tools didn't answer all my questions, I think its fine to describe my scenario here to get some input. I want to develop a backup strategy that suits my needs. Here is a quick rundown of the requirements: - Open-Source Software - Commandline support (Not just a GUI) - I want to backup and restore from/to multiple devices. (All devices are running linux) - I want to be able to backup specific files/folders, and ignore others - I want to be able to backup to multiple destinations, e.g.: - An external HDD - Some off-site server (In case my house burns down) - I would like to automate backups, e.g. using cron - I would like that backups can be encrypted properly - I would like the backups to be deduplicating, so, only the delta to the previous backup is stored. - When restoring from a backup I'd like to be able to directly use the restored backup as a new point to backup new changes. (Think git-repository, where you can directly push new changes after you cloned the repository to a new system). After conducting some research, there are two programs that for the most part seem to be a good fit: - borgbackup - restic With borgbackup I see two problems: - I can restore files in two ways: Either I fuse-mount the backup or directly extract the backup. However, when restoring, I always get just get the files. When I restore a backup to a new system, I have to set all the repositories up fresh again, in order to run new backups from the new host? That is very inconvenient. (Again: I would love a similar behavior like a git repository, where the restored data/repository directly can be used to backup (push) new data.) - I don't think its possible to specify multiple endpoints for backups. E.g. I can backup my data to a remote server, but I can't also sync to my external HDD. (See: https://borgbackup.readthedocs.io/en/stable/faq.html#can-i-backup-from-multiple-servers-into-a-single-repository) . The way I see it, cold storage backups, like an external HDD doesn't seem to go to well with borg. With restic: - The same as with borg, essentially. So, my question is, how can I achieve a backup solution that works for the scenario I described above. Are borg and restic the right tools for the job here? If so, how do I deal with the problems I described? If not, is there other backup software that would be better here?
Kyu96 (193 rep)
Dec 13, 2021, 06:03 PM • Last activity: Mar 11, 2024, 09:07 PM
3 votes
1 answers
1084 views
restic - can't create backup from remote server
I want to backup a directory **FROM** `root@1.1.1.1:/home/user/mc` **TO** `/local/backup-folder` on my PC. Why does this not work? restic init --repo /local/backup-folder restic -r /local/backup-folder backup sftp:root@1.1.1.1:/home/user/mc sftp:root@1.1.1.1:/home/user/mc does not exist, skipping in...
I want to backup a directory **FROM** root@1.1.1.1:/home/user/mc **TO** /local/backup-folder on my PC. Why does this not work? restic init --repo /local/backup-folder restic -r /local/backup-folder backup sftp:root@1.1.1.1:/home/user/mc sftp:root@1.1.1.1:/home/user/mc does not exist, skipping init does not exist, skipping Fatal: all target directories/files do not exist Using ssh root@1.1.1.1 ls /home/user/mc works, and the remote directory does exist.
ывапав (43 rep)
Aug 28, 2023, 02:47 PM • Last activity: Mar 11, 2024, 09:06 PM
1 votes
0 answers
28 views
Why did I get the old restic docker container?
A year ago I have been playing around with `restic` using the `restic/restic` container. A simple call, like `docker run restic/restic`. Last week, I finished what I wanted to do with `restic` and I ran into a problem. After quite a bit of searching, I noticed this when I asked `restic/restic` for a...
A year ago I have been playing around with restic using the restic/restic container. A simple call, like docker run restic/restic. Last week, I finished what I wanted to do with restic and I ran into a problem. After quite a bit of searching, I noticed this when I asked restic/restic for a version, and it told me:
restic 0.15.1 compiled with go1.19.5 on linux/amd64
That was old. So, I did a docker pull of restic/restic, and after that it says:
restic 0.16.2 compiled with go1.21.3 on linux/amd64
after which, luckily my restic problem was gone. But what I don't understand is why did I get that old container in the first place? Probably, the first time I ran it a year ago, it downloaded that image. But docker images did not list it. docker images -a does. But why. This is not an 'intermediate image' for which -a is intended. What am I missing?
gctwnl (133 rep)
Jan 7, 2024, 05:43 PM • Last activity: Mar 11, 2024, 09:06 PM
Showing page 1 of 6 total questions