Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sharne/rsync #316

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
ae4a73c
Fixed error
Oct 12, 2023
873d4b8
Merge branch 'main' of github.com:SUSE/doc-modular into fix-freeradius
Oct 12, 2023
cea0e30
Added new files for rsynch Smartdocs
Jan 17, 2024
7e0877f
Updated content
harneshalaka Mar 15, 2024
b57bad8
Added content
harneshalaka Mar 18, 2024
51bd9ab
updated content
harneshalaka Mar 19, 2024
1878203
Updated content.
harneshalaka Mar 21, 2024
43c1a47
Updated content
harneshalaka Mar 21, 2024
e07812a
Updated troubleshooting content.
harneshalaka Jun 4, 2024
5650760
Updated the link.
harneshalaka Jun 5, 2024
5af886a
Updated
harneshalaka Jun 5, 2024
64df604
Updated steps.
harneshalaka Jun 5, 2024
0f5e33e
Added rsync options.
harneshalaka Jun 5, 2024
be881b6
Updated options.
harneshalaka Jun 5, 2024
a0c336c
Fixed feedback from Tanja
harneshalaka Aug 5, 2024
9e5d58f
Fixed feedback.
harneshalaka Feb 17, 2025
3bf1f72
Fixed feedback.
harneshalaka Feb 18, 2025
6fb30fa
Fixed feedback.
harneshalaka Feb 18, 2025
1df76a4
Resolved conflict.
harneshalaka Feb 18, 2025
ad67eaf
Resolved conflict.
harneshalaka Feb 18, 2025
a014185
Apply suggestions from code review
harneshalaka Feb 19, 2025
20bed2a
Apply suggestions from code review
harneshalaka Feb 19, 2025
e431d20
Apply suggestions from code review
harneshalaka Feb 19, 2025
6aa654a
Apply suggestions from code review
harneshalaka Feb 19, 2025
72ea7a0
Fixed editorial feedback.
harneshalaka Feb 19, 2025
08e4448
Fixed validation error.
harneshalaka Feb 19, 2025
685e588
Update tasks/copy-file-with-rsyc-configure-rsync-server.xml
harneshalaka Feb 19, 2025
90f844a
Updated file name.
harneshalaka Mar 4, 2025
efc670d
Renamed.
harneshalaka Mar 4, 2025
ab7897d
Fixed validation error.
harneshalaka Mar 5, 2025
4f702e4
Fixed error.
harneshalaka Mar 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DC-manage-vm-on-commandline → DC-SLES-copy-file-rsync
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## ----------------------------
##
## Basics
MAIN="manage-vm-on-commandline.asm.xml"
MAIN="copy-file-with-rsync.asm.xml"
SRC_DIR="articles"
IMG_SRC_DIR="images"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
-->
<!-- R E S O U R C E S -->
<!-- Glue files -->
<!--<resources>
<!--><resources>
<resource xml:id="_glue-example" href="../glues/glue.xml">
<description>Glue example</description>
</resource>
Expand All @@ -29,25 +29,49 @@
<resource xml:id="_glue-whats-next" href="../glues/glue-whats-next.xml">
<description>Glue what's next</description>
</resource>
</resources>-->
</resources>
-->
<!-- Concept files -->

<resources>
<resource href="../concepts/manage-vm-on-commandline-concept.xml" xml:id="_manage-vm-on-commandline-concept">
<description>Unified management of virtual machines using &libvirt;</description>
<resource xml:id="_copy-file-with-rsync-concept" href="../concepts/copy-file-with-rsync-concept.xml">
<description>Copying files using rsync</description>
</resource>
<resource xml:id="_copy-file-with-rsync-locally" href="../concepts/copy-file-with-rsync-locally.xml">
<description>Copying files and directories using rsync locally</description>
</resource>
<resource xml:id="_copy-file-with-rsync-remotely" href="../concepts/copy-file-with-rsync-remotely.xml">
<description>Copying files and directories using rsync remotely</description>
</resource>
<resource xml:id="_copy-file-with-rsync-usage" href="../concepts/copy-file-with-rsync-usage.xml">
<description>Use rsync to copy files and directories.</description>
</resource>
<resource href="../concepts/manage-vm-on-commandline-vmm.xml" xml:id="_manage-vm-on-commandline-vmm">
<description>&libvirt; unifies management of virtual machines.</description>
</resource>
</resources>
<resource xml:id="_copy-file-with-rsync-delete-update" href="../concepts/copy-file-with-rsync-delete-update.xml">
<description>Use rsync to update and delete files and directories.</description>
</resource>
<resource xml:id="_copy-file-with-rsync-troubleshooting" href="../concepts/copy-file-with-rsync-troubleshooting.xml">
<description>The steps to follow if rsync fails to copy files or directories</description>
</resource>
</resources>

<!-- Tasks -->
<!--<resources>
</resources>-->

<resources>

<resource xml:id="_copy-file-with-rsync-configure-rsync-server" href="../tasks/copy-file-with-rsyc-configure-rsync-server.xml">
<description>Use rsync to copy files and directories.</description>
</resource>

</resources>

<!-- References -->
<!--
<resources>
<resource href="../references/manage-vm-on-commandline-tools.xml" xml:id="_manage-vm-on-commandline-tools">
<description>&libvirt; unifies management of virtual machines.</description>
</resource>
<resource xml:id="_reference-example" href="../references/reference.xml">
<description>Reference example</description>
</resource>
</resources>
-->
<!-- Legal -->
<resources>
<resource href="../common/legal.xml" xml:id="_legal">
Expand All @@ -58,33 +82,25 @@
</resource>
</resources>
<!-- S T R U C T U R E -->
<structure renderas="article" xml:id="manage-vm-on-commandline" xml:lang="en">
<structure renderas="article" xml:id="copy-files-directories-with-rsync" xml:lang="en">
<merge>
<title>Unified Virtual Machine Administration using &libvirt;</title>
<!-- <subtitle>Subtitle if necessary</subtitle>-->
<title>Copying Files and Directories with rsync</title>
<!-- <subtitle>Subtitle if necessary</subtitle> -->
<!-- Create changelog to enable versioning; add most recent entries at the top. -->
<revhistory>
<title>Changelog</title>
<revision><revnumber>1</revnumber><date>2023-09-19</date>
<revhistory xml:id="rh-copy-file-with-rsync">
<revision><date>2025-02-18</date>
<revdescription>
<para>
Initial version
</para>
</revdescription>
</revision>
<!--<revision><revnumber>1</revnumber><date>2024-10-10</date>
<revdescription>
<para>
Describe the purpose of this revision
</para>
</revdescription>
</revision>-->
</revhistory>
<!-- TODO: provide a listing of possible and validatable meta entry values. Maybe in our geekodoc repo? -->
<!-- add author's e-mail -->
<meta name="maintainer" content="[email protected]" its:translate="no"/>
<!-- ISO date of last update as YYYY-MM-DD -->
<meta name="updated" content="2023-09-19" its:translate="no"/>
<meta name="Shalaka Harne" content="[email protected]" its:translate="no"/>
<!-- ISO date of last update as YYYY-MM-DD
<meta name="updated" content="2023-11-11" its:translate="no"/> -->
<!-- this does not work yet. Use the dm tags listed below for now
<meta name="bugtracker" its:translate="no">
<phrase role="url">https://bugzilla.suse.com/enter_bug.cgi</phrase>
Expand All @@ -103,24 +119,18 @@
identifiers, separated by ; -->
<meta name="architecture" content="x86;power" its:translate="no"/>
<meta name="productname" its:translate="no">
<!-- enter product name and version -->
<productname version="15-SP5"></productname>
<productname version="15-SP4"></productname>
<productname version="15-SP3"></productname>
<productname version="15-SP2"></productname>
<productname version="15-SP1"></productname>
<productname version="15-GA"></productname>
<!-- enter product name and version --><productname version="16">&sles;</productname>
</meta>
<meta name="title" its:translate="yes">Unified Management of Virtual Machines using &libvirt;</meta>
<meta name="description" its:translate="yes">An overview of managing virtual machine on command line using libvirt.</meta>
<meta name="social-descr" its:translate="yes">Virtual Machine management using libvirt on command line.</meta>
<meta name="title" its:translate="yes">How to Copy Files and Directories Using rsync</meta>
<meta name="description" its:translate="yes">An overview of copying files and directories locally and remotely using rsync</meta>
<meta name="social-descr" its:translate="yes">Copy files and directories with rsync</meta>
<!-- suitable category, comma-separated list of categories -->
<meta name="category" content="Systems Management, Security" its:translate="no"/>
<meta name="category" content="Systems Management" its:translate="no"/>
<dm:docmanager xmlns:dm="urn:x-suse:ns:docmanager">
<dm:bugtracker>
<dm:url>https://bugzilla.suse.com/enter_bug.cgi</dm:url>
<dm:component>Smart Docs</dm:component>
<dm:product>Documentation</dm:product>
<dm:product os="sles">SUSE Linux Enterprise Server 16.0</dm:product>
<dm:assignee>[email protected]</dm:assignee>
</dm:bugtracker>
<dm:translation>yes</dm:translation>
Expand All @@ -130,56 +140,72 @@
<varlistentry>
<term>WHAT?</term>
<listitem>
<para>
This article introduces &libvirt;&mdash;a set of tools that unify the management of virtual machines.
<para>
You can use the rsync tool to copy files locally or remotely. rsync is unidirectional and can copy files only in one direction.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>WHY?</term>
<listitem>
<para>
By understanding &libvirt;, you make the first step to easily manage virtual machines regardless of the virtualization technology used.
This article provides an overview of the rsync tool and its basic usage for copying files locally and remotely.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>EFFORT</term>
<listitem>
<para>
It takes 15 minutes to understand libvirt.
It takes up to 20 minutes to understand the basic usage of the rsync tool.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>GOAL</term>
<listitem>
<para>
Basic understanding of &libvirt; and related tools.
Gain a foundational understanding of rsync and how to use it for file transfers.
</para>
</listitem>
</varlistentry>
</variablelist>
<varlistentry>
<term>REQUIREMENTS</term>
<listitem>
<para>
Access permissions to the source and destination locations for copying files.
</para>
</listitem>
</varlistentry>
</variablelist>
</abstract>
</merge>
<!-- pull in all the topic files you need -->
<!-- pick the appropriate type of include to match your needs -->
<!-- pull in a topic as is -->
<!-- <module resourceref="_glue-example" renderas="section"/>
pull in a topic and switch the title -->
<!--<module resourceref="_concept-example" renderas="section">
<!--module resourceref="_glue-example" renderas="section"/>
<! pull in a topic and switch the title
<module resourceref="_concept-example" renderas="section">
<merge>
<title>You are a very special concept now!</title>
</merge>
</module>-->

<!-- <module resourceref="_reference-example" renderas="section"/>
<!--module resourceref="_task-example" renderas="section"/>
<module resourceref="_reference-example" renderas="section"/>
<module resourceref="_glue-more-info" renderas="section"/>
<module resourceref="_glue-whats-next" renderas="section"/>-->
<module resourceref="_manage-vm-on-commandline-concept" renderas="section"></module>
<module resourceref="_manage-vm-on-commandline-vmm" renderas="section"></module>
<module resourceref="_manage-vm-on-commandline-tools" renderas="section"></module>
<module resourceref="_legal" renderas="section"/>
<module resourceref="_gfdl" renderas="appendix"/>
</structure>
<module resourceref="_copy-file-with-rsync-concept" renderas="section"/>
<!--module resourceref="_copy-file-with-rsync-usage" renderas="section"/>-->
<module resourceref="_copy-file-with-rsync-usage" renderas="section"/>
<module resourceref="_copy-file-with-rsync-locally" renderas="section"/>
<module resourceref="_copy-file-with-rsync-remotely" renderas="section"/>

<module resourceref="_copy-file-with-rsync-configure-rsync-server" renderas="section"/>
<module resourceref="_copy-file-with-rsync-delete-update" renderas="section"/>
<module resourceref="_copy-file-with-rsync-troubleshooting" renderas="section"/>
<module resourceref="_legal"/>
<module resourceref="_gfdl">
<output renderas="appendix"/>
</module>
</structure>
</assembly>
3 changes: 2 additions & 1 deletion articles/freeradius-setup-server.asm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@

<resource href="../tasks/freeradius-setup-server-create-test-certificates.xml" xml:id="_freeradius-setup-server-create-test-certificates"></resource>
<resource href="../tasks/freeradius-setup-server-add-client-user.xml" xml:id="_freeradius-setup-server-add-client-user"></resource>
<resource href="../tasks/freeradius-setup-server-start-server.xml" xml:id="_freeradius-setup-server-start-freeradius"></resource>
<resource href="../tasks/freeradius-setup-server-start-server.xml" xml:id="_freeradius-setup-server-start-server"></resource>
<resource href="../tasks/freeradius-setup-server-start-freeradius.xml" xml:id="_freeradius-setup-server-start-freeradius"></resource>
<resource href="../tasks/freeradius-setup-server-test-authentication.xml" xml:id="_freeradius-setup-server-test"></resource>
</resources>
<!-- References -->
Expand Down
27 changes: 27 additions & 0 deletions concepts/copy-file-with-rsync-concept.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
[
<!ENTITY % entities SYSTEM "../common/generic-entities.ent">
%entities;
]>
<!-- refers to https://github.com/SUSE/doc-sle/blob/main/xml/systemd.xml [sec-boot-systemd-timer-units] -->
<topic xml:id="copy-file-with-rsync-concept"
role="concept" xml:lang="en"
xmlns="http://docbook.org/ns/docbook" version="5.2"
xmlns:its="http://www.w3.org/2005/11/its"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:trans="http://docbook.org/ns/transclusion">
<info>
<title>The rsync concept</title>
<meta name="maintainer" content="[email protected]" its:translate="no"/>
<abstract>
<para>
You can use the <literal>rsync</literal> tool for transferring or copying files locally and remotely. <literal>rsync</literal> is unidirectional. It copies files in a single direction and does not synchronize data.
Instead of transmitting all the contents in the file, <literal>rsync</literal> minimizes the amount of data copied by moving only the changes within the file. Hence, this supports the transfer of data over a slow network connection.</para>
</abstract>
</info>
<para>For copying large files using <literal>rsync</literal>, detecting changes requires certain computing power. So ensure that machines on both source and destination have enough resources, including RAM. </para>
<para>Use rsync when a large amount of data containing only minor changes needs to be transmitted regularly. This is useful when working with backups. <literal>rsync</literal> can also be useful for mirroring staging servers that store complete directory trees of Web servers to a Web server in a DMZ.</para>
<para>This article includes examples that show the usage of <literal>rsync</literal> to copy files locally and remotely. This document also explains how to configure and use an <literal>rsync</literal> server.</para>
</topic>
28 changes: 28 additions & 0 deletions concepts/copy-file-with-rsync-delete-update.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
[
<!ENTITY % entities SYSTEM "../common/generic-entities.ent">
%entities;
]>
<!-- refers to https://github.com/SUSE/doc-sle/blob/main/xml/systemd.xml [sec-boot-systemd-timer-units] -->
<topic xml:id="copy-file-with-rsync-delete-update"
role="concept" xml:lang="en"
xmlns="http://docbook.org/ns/docbook" version="5.2"
xmlns:its="http://www.w3.org/2005/11/its"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:trans="http://docbook.org/ns/transclusion">
<info>
<title>Deleting and updating files and directories with rsync</title>
<meta name="maintainer" content="[email protected]" its:translate="no"/>
<abstract>
<para>You can copy and synchronize files within the same machine using rsync if you have write permission for the destination location. You can also delete files or directories after copying.</para></abstract>
</info>
<para>To copy files <filename>example1.txt</filename> and <filename>example2.txt</filename> from <filename>/source/directory/</filename> to <filename>/destination/directory/</filename>:</para>
<screen>&prompt.user;<command>rsync -av --update /source/directory/ /destination/directory/</command></screen>
<para>The rsync command updates the files <filename>example1.txt</filename> and <filename>example2.txt</filename> in the <filename>/destination/directory/</filename> if it is older than the source file. If the version in the destination is newer, then the files will not be overwritten. Also, all other new files or directories from <filename>/source/directory/</filename> will be copied to <filename>/destination/</filename>.</para>
<para>To copy an existing file and delete a file that does not exist in the destination directory:</para>
<screen>&prompt.user;<command>rsync -av --delete /source/directory/ /destination/directory/</command></screen>
<para>In this scenario, both the source and destination directories contain <filename>example1.txt</filename> and <filename>example2.txt</filename>. The <filename>/destination/directory</filename> contains an extra file, <filename>example3.txt</filename>.</para>
<para>The rsync command copies or updates the files <filename>example1.txt</filename> and <filename>example2.txt</filename> from <filename>/source/directory/</filename> to <filename>/destination/directory/</filename>. The command also deletes the file <filename>example3.txt</filename> from <filename>/destination/directory/</filename> as it does not exist in the <filename>/source/directory/</filename>. Also, the directory structure in <filename>/destination/directory/</filename> is cleaned up to match the <filename>/source/directory/</filename>.</para>
</topic>
26 changes: 26 additions & 0 deletions concepts/copy-file-with-rsync-locally.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
[
<!ENTITY % entities SYSTEM "../common/generic-entities.ent">
%entities;
]>
<!-- refers to https://github.com/SUSE/doc-sle/blob/main/xml/systemd.xml [sec-boot-systemd-timer-units] -->
<topic xml:id="copy-file-using-rsync-locally"
role="concept" xml:lang="en"
xmlns="http://docbook.org/ns/docbook" version="5.2"
xmlns:its="http://www.w3.org/2005/11/its"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:trans="http://docbook.org/ns/transclusion">
<info>
<title>Copying files and directories with rsync locally</title>
<meta name="maintainer" content="[email protected]" its:translate="no"/>
<abstract>
<para>You can copy files within the same machine using rsync if you have write permission for the destination location.</para></abstract>

</info>
<para>To copy the file <filename>backup.tar.xz</filename> to the location <filename>/var/backup/</filename>, use the command
<command>rsync -avz backup.tar.xz /var/backup/</command>.</para>
<para>The file <filename>backup.tar.xz</filename> is copied to <filename>/var/backup/</filename>, and the absolute path is<filename>/var/backup/backup.tar.xz</filename>.</para>

</topic>
Loading