burger
infomaniak
infomaniak
cloud-computing-logo
Cloud Computing
web-domain-logo
Web & Domains
event-marketing-logo
Events & Marketing
  • Our products
    • Collaborative tools icon chevron
    • Web & Domains icon chevron
    • Cloud Computing icon chevron
    • Events & Marketing icon chevron
    • Streaming icon chevron

      ksuiteCollaborative suite

      Discover the collaborative suite → Discover →
    • kSuite Professional email, sovereign cloud and AI for sustainable performance
    • kSuite The suite for secure communication, storage and sharing
    • kdrive
      kDrive Store, collaborate and share your files
    • mail service
      Mail Service Create your email addresses with your domain
    • kChat
      kChat Communicate live with your teams
    • kmeet
      kMeet Organise your meetings online in complete security
    • swisstransfer
      SwissTransfer Send your files up to 50 GB free of charge.
    • kpaste
      kPaste Share and encrypt your sensitive information
    • ksuite
      Custom Brand Control the brand image of your products
    • kChat
      Chk Link reducer & QR code generator
      Find the web hosting solution you need
    • Domain name
      Domain name Reserve your domain name at the best price
    • Site Creator
      Site Creator Create your website with ease
    • web hosting
      Web Hosting Create your website with over 100 CMS
    • web hosting
      Wordpress Hosting Create your WordPress website easily
    • Cloud Server
      Cloud Server Power up your sites with guaranteed resources
    • SSL Certificat
      SSL certificates Secure your websites with an EV or DV certificate
    • Options
    • Domain privacy
      Domain Privacy Protect your domains’ private data
    • DNS Fast Anycast
      FastAnycast DNS Speed up your site access times
    • Dyn DNS
      DynDNS Access your devices remotely
    • Dyn DNS
      Renewal Warranty Secure your domains against loss and theft
      Find the right Cloud Computing solution

      Cloud services

    • public cloud
      Public Cloud (IaaS) Create your projects in a high-end, ultra-competitive Cloud
    • Cloud Server
      VPS Cloud Create a Windows / Linux server
    • Kubernetes service Deploy your containerised apps on a large scale.
    • VPS Lite
      VPS Lite Create a Windows/Linux server at a low cost
    • Database Service Manage your databases with a managed solution
    • jelastic cloud
      Jelastic Cloud (PaaS) Create your own customised environments
    • Other services

    • llm api
      AI Tools Boost your productivity with our sovereign AI
    • swiss backup
      Swiss Backup Back up your devices in the Cloud
    • nas synology
      NAS Synology Rent a NAS in our secure data centers
    • High availibility
      Very High Availability Create a multi-data center infrastructure with customised SLAs
    • Housing
      Housing Install your servers in our data centers
    • Auth Add a privacy-friendly login method to your apps
      Infomaniak Events, the independent local events portal
      Online ticketing service with a wide choice of concerts, shows and events.
    • online shop
      Ticketing Create your ticketing service and sell tickets
    • kdrive
      Access Control Control access to your events with ease
    • kdrive
      Guest manager Automate your event invitations
    • kdrive
      Newsletter Send your newsletters at competitive prices
    • Streaming radio
      Streaming radio Create and broadcast your own live radio station online
    • streaming video
      Video-Streaming Create and broadcast live events and TV online
    • VOD and AOD
      VOD & AOD service Host and broadcast your recordings without limits
  • Resources
    documentation icon Documentation
    Guides & tutorials
    API documentation
    special offers icon Special offers
    Get started for free
    Student programme
    Become an affiliate
    partner program icon Partner programme
    Find a partner
    Become a partner
    support icon Support & contact
    Contact Support
    Premium support - 24/7
    Contact our sales department
    Hiring an expert
    Migrate to Infomaniak
  • About us
    forest
    icon Ecological commitment
    We pollute. But we are taking action to reduce the footprint of our services and infrastructure
    Discover our commitment →
    icon About Infomaniak
    Our vision, our values
    Our teams
    Infomaniak is recruiting
    Press and communication
    Blog and news
    icon Security
    Data confidentiality
    Bug Bounty Programme
  • Get started for free
    Sign in
  • search-icon
    close-icon
      icon

      Would your needs exceed our solutions? To find out, contact us so that we can advise you personally.

      Our flagship products:
  • search-icon
  • Get started for free
    Sign in
Price Price
Knowledge base

1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!

Knowledge base Back up a Web hosting with Restic on Swiss Backup (Swift)

    Back up a Web hosting with Restic on Swiss Backup (Swift)

    This guide details how to back up data from your Web hosting (Starter, shared or Serveur Cloud) using the application restic via the OpenStack Swift protocol on Swiss Backup, an independent Swiss cloud backup solution.

    Other solutions exist to back up your web data: check out this other guide.

     

    Prerequisites

    • Use a Web Hosting.
    • Have a Swiss Backup Infomaniak space with at least one available device quota for a Cloud backup.
    • Add 1 device of type Cloud to obtain the OpenStack Swift parameters.

     

    ⚠️ All the services offered by Infomaniak are compatible with the corresponding standard protocols (notably IMAP/SMTP for email, WebDAV for sharing, S3/Swift for storage, etc.). Therefore, if you encounter a problem with third-party software, contact its publisher directly or a Partner and consult the support policy as well as article 11.9 of the Infomaniak Terms and Conditions.

     

    Install Restic

    For this:

    1. Download the linux_amd64 binary from the restic github repository:

      uid@h2web:~$ wget -O restic.bz2 https://github.com/restic/restic/releases/download/v0.14.0/restic_0.14.0_linux_amd64.bz2

      ⚠️ The download link may change with the release of a new version; version 0.14 uses default compression.

    2. Unzip the archive and make the binary executable:

      uid@h2web:~$ bunzip2 restic.bz2
      uid@h2web:~$ chmod +x restic

     

    Set up Restic

    Creation of an encryption key to encrypt the data

    • The key cannot be changed and if lost, the data will no longer be readable.
    • Place this key in a file readable by Restic.
    • Example of key generation:

      uid@h2web:~$ openssl rand -base64 16 > restickey	

    Configuration of restic

    To configure the backup:

    1. Create a file resticconfig with the following content to be adapted according to the information specific to your device:

      echo "export OS_AUTH_URL=https://swiss-backupXX.infomaniak.com/identity/v3
      export OS_REGION_NAME=RegionOne
      export OS_PROJECT_NAME=sb_project_SBI-XXXX
      export OS_PASSWORD=''
      export OS_USER_DOMAIN_NAME=default
      export OS_USERNAME=SBI-XXXX
      export OS_PROJECT_DOMAIN_NAME=default
      export RESTIC_REPOSITORY=swift:sb_project_SBI-XXXX:/
      export RESTIC_PASSWORD_FILE=restickey" > resticconf
      • OS_AUTH_URL URL to access the Swiss Backup cluster (1)
      • OS_PROJECT_NAME and OS_USERNAME replace SBI-XXXX with your identifier
      • OS_PASSWORD replace with the password generated upon activation
      • RESTIC_REPOSITORY
        1. replace SBI-XXXX with your identifier
        2. replace the bucket name with the name you want to give to your container that stores the backups
      • RESTIC_PASSWORD_FILE replace with the full path to the file containing the encryption key
    2. Load the Restic configuration by running the following command:

      source resticconf	
    3. Initialize the bucket with the following command:

      uid@h2:~$ ./restic -r $RESTIC_REPOSITORY init	

    (1) The indication "//swiss-backup02", "//swiss-backup03" etc. changes according to the cluster number indicated on the Manager in the Cloud storage information under "Location"; and if your Swiss Backup device was created before October 2020, you will need to use https://swiss-backup.infomaniak.com/identity/v3

     

    Back up your files

    To back up your files, simply run the following command:

    uid@h2:~$ ./restic backup
    #exemple pour sauvegarder l'ensemble d'un hébergement
    uid@h2:~$ ./restic backup ./
    #exemple pour sauvegarder le dossier sites
    uid@h2:~$ ./restic backup sites/

    The first snapshot takes a long time (several hours depending on the amount of data) because all files are copied, while subsequent ones will use the differential principle.

     

    Backup the databases

    Restic can read data from stdin to record a program's output.

    Use the following command to back up an individual MySQL database:

    mysqldump --databases nom_de_la_base_de_données -u utilisateur_de_la_base_de_données -p | restic backup --stdin --stdin-filename database_dump.sql	

    To back up all databases, run the mysqldump command to extract all databases from the server, then redirect the output to Restic:

    mysqldump -u utilisateur_de_la_base_de_données -p --all-databases | restic backup --stdin --stdin-filename all_databases.sql	

     

    List backups

    To list your backups, you can use the following command:

    uid@h2:~$ ./restic snapshots	

     

    Restore a backup

    You can restore a backup with the following command:

    uid@h2:~$ ./restic restore  --target 	

     

    Automate

    On Cloud Server, it is possible to add a cron job to automate the launch of the backup. 

    On shared hosting, this option is not available.



    Link to this FAQ:
    Has this FAQ been helpful?
    Thank you for your feedback. Improve this FAQ?
    Please do not ask any questions through this form, it is only used to improve our FAQ.
    Please use our contact form for any question.
    Your message has been sent. Thank you for suggesting an improvement to this FAQ.
    Display all FAQs for this product
    logo infomaniak
    Prices do not include VAT
    facebook
    twitter
    linkedin
    instagram

    Infomaniak

    About Infomaniak The team Infomaniak is recruiting Press space Infomaniak blog All certificates Products and offers Clients' opinions

    Support

    Assistance 7/7 FAQ and guides Premium Support Sales contact API REST Report abuse WHOIS

    Partnerships

    Become a reseller Affiliate programme Directory of partners Requests for quotes

    Ecology

    Green hosting Certificates & awards

    Follow our development

    The email entered is invalid
    earth icon
    • EN
      • EN
      • DE
      • ES
      • FR
      • IT
    ©2025 Infomaniak - Legal documents - Legal notice - Data Protection - Privacy Policy - Site map - Manage your cookies
    icann-logo
    swiss
    new-iso
    swiss-hosting
    logo infomaniak
    Prices do not include VAT

    Infomaniak

    About Infomaniak The team Infomaniak is recruiting Press and media Infomaniak blog All certificates Products and offers Clients' opinions

    Support

    Assistance 7/7 FAQ and guides Premium Support offer Sales contact API REST Report abuse WHOIS

    Partnerships

    Become a reseller Affiliate programme Directory of partners Requests for quotes

    Ecology

    Green hosting Certificates & awards

    Follow our development

    The email entered is invalid
    icann-logo
    swiss
    new-iso
    swiss-hosting

    facebook
    twitter
    linkedin
    instagram
    ©2025 Infomaniak
    Contracts - Legal notice - Data Protection - Privacy Policy - Site map - Manage your cookies

    Managers

    earth icon
    • EN
      • EN
      • DE
      • ES
      • FR
      • IT
    Your browser is outdated, security and browsability are no longer guaranteed. We recommend that you update it as soon as possible by clicking here.