rsnapshot | Backups using rsync and hard links for deduplication | Incremental Backup library
kandi X-RAY | rsnapshot Summary
kandi X-RAY | rsnapshot Summary
rsnapshot comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. See the GNU General Public Licence for details.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of rsnapshot
rsnapshot Key Features
rsnapshot Examples and Code Snippets
Community Discussions
Trending Discussions on rsnapshot
QUESTION
I am using incremental backups using rsnapshot
combined with a custom
cmd_cp
and cmd_rm
to make use of btrfs snapshots, this procudes multiple
daily btrfs subvolumes:
ANSWER
Answered 2021-Sep-28 at 06:36I solved it! I created a bash script that syncs all snapshots with a date in the name to the remote server. The date is subtracted from btrfs subvolume show
.
So daily.0
can become 2021-09-20-08-44-46
on the remote.
I sync backwards. daily.30
first. daily.0
last. This way I can pass the
proper parent to btrfs send
. E.g.: btrfs send -p daily.30 daily.29
.
If the date named snapshot exists on the remote, I check with btrfs subvolume show
whether it was properly synced. If not, I delete the remote subvolume/snapshot and
re-sync. If it was already synced, I will skip the sync. A proper synced subvolume/snapshot has a Received UUID
and readonly
flag.
After syncing I compare all snapshot names of the remote to what was just synced. The difference will deleted (thus old snapshots).
I might share the code in the future when it's all been stable for a long run. For now I hope the above information will help others!
QUESTION
- I'm trying to make a rootfs backup from
ServerA
on toServerB
. - The connection is one way and is initialized from
ServerB
usingrsnapshot
. - I have made a
backup
account onServerA
and enabled paswordless sudo only forrsync
What I'm trying to accomplish:
- Change the
authorized_keys
file onServerA
, so only thersync
command can be used via ssh.
On ServerB
- /etc/rsnapshot.conf
is setup to run rsync
with the following args:
rsync_long_args --rsync-path="sudo rsync" --delete --numeric-ids --relative --delete-excluded
I have tried the following on ServerA
:
from="ServerB",command="sudo rsync *" ssh-ed25519 SSH-KEY
But rsnapshot
keeps crashing and giving IO error codes for rsync
.
What am I missing here?
...ANSWER
Answered 2021-Jul-15 at 08:36!! Problem Solved !!
Found out about rrsync --- /usr/share/doc/rsync/scripts/rrsync
, copy it to wherever.
ServerA:authorized_keys --- command="sudo /usr/local/bin/rrsync -ro /backup"
Since I'm keeping a copy of the backups on ServerA
, I might as well rsync from them instead of using rsnapshot on ServerB
. (This was my initial idea, but it doesn't work since there are duplicate files because of links that rsnapshot creates, I ended up having rsnapshot running both on ServerA
and ServerB
, to save backups from ServerA
to a localDir on ServerA
and also make remote snapshots from ServerA
to ServerB
.)
- Also changed the sudoers file on
ServerA
:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install rsnapshot
Debian: 3.0 (woody), 3.1 (sarge), unstable (sid)
Redhat: 7.x, 8.0, Enterprise Linux 3.0 ES
Fedora Core 1, 3
CentOS 3, 4
WhiteBox Enterprise Linux 3.0
Slackware 9.0
SuSE: 9.0
FreeBSD 4.9-STABLE
OpenBSD 3.x
Solaris 8 (SPARC and x86)
Mac OS X
IRIX 6.5
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page