nx_backup download function
This commit is contained in:
@@ -110,6 +110,12 @@
|
|||||||
mkdir $argv
|
mkdir $argv
|
||||||
cd $argv
|
cd $argv
|
||||||
'';
|
'';
|
||||||
|
nx_backup = let
|
||||||
|
destination = if hyper.host == "NxNORTH" then "${hyper.home}/shared/" else "${hyper.home}/backups/";
|
||||||
|
in pkgs.lib.mkIf (hyper.host != "NxACE") ''
|
||||||
|
set RPATH (curl -s https://${hyper.domain}/latest-backup)
|
||||||
|
rsync -avz --info=progress2 -e "ssh -p ${builtins.toString secrets.ssh.port}" ${hyper.user}@ssh.${hyper.domain}:"$RPATH" ${destination}
|
||||||
|
'';
|
||||||
# gpg = '';
|
# gpg = '';
|
||||||
# set bold \e[1m
|
# set bold \e[1m
|
||||||
# set green \e[32m
|
# set green \e[32m
|
||||||
|
|||||||
Reference in New Issue
Block a user