Running a borg extract remotely
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
Consider that backups have been made to a remote repository, located on /mnt/backup
on server
.
For non-Borg users, a repository consists of multiple archives. A single archive is created every time a backup is made. Now, suppose I want to extract a specific archive - for simplicity, the most recent one.
The way I'm currently doing this is to get a list of archives from the remote repository, and then store their names in a mailarchives
array. That looks like:
mapfile -t mailarchives < <(borg list --short 'faheem@server:/mnt/backup')
Then I extract all the files from mailarchive[-1]
(the most recent archive), to verify that the archive is valid and that I can restore from it. That looks like:
borg extract -n 'faheem@server:/mnt/backup'::"$mailarchives[-1]"
However, this uses colossal amounts of data to copy everything locally. So, my question is whether it's possible to do all this remotely, and only transmit the result (whether success or failure) locally via ssh
. I think it should be possible, but I don't know exactly how.
An even simpler example is
borg check faheem@server:/mnt/backup
which for some reason also consumes lots of data.
Also, despite appearances, this question isn't really Borgbackup specific. It could be phrased more generally as: if I have want to run a check on a remote machine, but which normally requires a lot of data to be downloaded locally if I want to run the check locally, can I run this check remotely, and just pass the result of success or failure to local?
And finally, a note from Borg's main/lead developer:
ThomasWaldmann> faheem: borg returns 0 on success, 1 on warning, 2 on error.
ssh borgbackup
add a comment |Â
up vote
2
down vote
favorite
Consider that backups have been made to a remote repository, located on /mnt/backup
on server
.
For non-Borg users, a repository consists of multiple archives. A single archive is created every time a backup is made. Now, suppose I want to extract a specific archive - for simplicity, the most recent one.
The way I'm currently doing this is to get a list of archives from the remote repository, and then store their names in a mailarchives
array. That looks like:
mapfile -t mailarchives < <(borg list --short 'faheem@server:/mnt/backup')
Then I extract all the files from mailarchive[-1]
(the most recent archive), to verify that the archive is valid and that I can restore from it. That looks like:
borg extract -n 'faheem@server:/mnt/backup'::"$mailarchives[-1]"
However, this uses colossal amounts of data to copy everything locally. So, my question is whether it's possible to do all this remotely, and only transmit the result (whether success or failure) locally via ssh
. I think it should be possible, but I don't know exactly how.
An even simpler example is
borg check faheem@server:/mnt/backup
which for some reason also consumes lots of data.
Also, despite appearances, this question isn't really Borgbackup specific. It could be phrased more generally as: if I have want to run a check on a remote machine, but which normally requires a lot of data to be downloaded locally if I want to run the check locally, can I run this check remotely, and just pass the result of success or failure to local?
And finally, a note from Borg's main/lead developer:
ThomasWaldmann> faheem: borg returns 0 on success, 1 on warning, 2 on error.
ssh borgbackup
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
Consider that backups have been made to a remote repository, located on /mnt/backup
on server
.
For non-Borg users, a repository consists of multiple archives. A single archive is created every time a backup is made. Now, suppose I want to extract a specific archive - for simplicity, the most recent one.
The way I'm currently doing this is to get a list of archives from the remote repository, and then store their names in a mailarchives
array. That looks like:
mapfile -t mailarchives < <(borg list --short 'faheem@server:/mnt/backup')
Then I extract all the files from mailarchive[-1]
(the most recent archive), to verify that the archive is valid and that I can restore from it. That looks like:
borg extract -n 'faheem@server:/mnt/backup'::"$mailarchives[-1]"
However, this uses colossal amounts of data to copy everything locally. So, my question is whether it's possible to do all this remotely, and only transmit the result (whether success or failure) locally via ssh
. I think it should be possible, but I don't know exactly how.
An even simpler example is
borg check faheem@server:/mnt/backup
which for some reason also consumes lots of data.
Also, despite appearances, this question isn't really Borgbackup specific. It could be phrased more generally as: if I have want to run a check on a remote machine, but which normally requires a lot of data to be downloaded locally if I want to run the check locally, can I run this check remotely, and just pass the result of success or failure to local?
And finally, a note from Borg's main/lead developer:
ThomasWaldmann> faheem: borg returns 0 on success, 1 on warning, 2 on error.
ssh borgbackup
Consider that backups have been made to a remote repository, located on /mnt/backup
on server
.
For non-Borg users, a repository consists of multiple archives. A single archive is created every time a backup is made. Now, suppose I want to extract a specific archive - for simplicity, the most recent one.
The way I'm currently doing this is to get a list of archives from the remote repository, and then store their names in a mailarchives
array. That looks like:
mapfile -t mailarchives < <(borg list --short 'faheem@server:/mnt/backup')
Then I extract all the files from mailarchive[-1]
(the most recent archive), to verify that the archive is valid and that I can restore from it. That looks like:
borg extract -n 'faheem@server:/mnt/backup'::"$mailarchives[-1]"
However, this uses colossal amounts of data to copy everything locally. So, my question is whether it's possible to do all this remotely, and only transmit the result (whether success or failure) locally via ssh
. I think it should be possible, but I don't know exactly how.
An even simpler example is
borg check faheem@server:/mnt/backup
which for some reason also consumes lots of data.
Also, despite appearances, this question isn't really Borgbackup specific. It could be phrased more generally as: if I have want to run a check on a remote machine, but which normally requires a lot of data to be downloaded locally if I want to run the check locally, can I run this check remotely, and just pass the result of success or failure to local?
And finally, a note from Borg's main/lead developer:
ThomasWaldmann> faheem: borg returns 0 on success, 1 on warning, 2 on error.
ssh borgbackup
edited May 17 at 9:11
Kusalananda
102k13199315
102k13199315
asked May 16 at 21:57
Faheem Mitha
22.1k1676131
22.1k1676131
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f444250%2frunning-a-borg-extract-remotely%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password